{ "info": { "author": "Stanis Trendelenburg", "author_email": "stanis.trendelenburg@gmail.com", "bugtrack_url": null, "classifiers": [ "License :: OSI Approved :: MIT License", "Programming Language :: Python", "Programming Language :: Python :: 2", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7" ], "description": "Bash-style brace expansion for Python\n=====================================\n\n|build-status-img|\n\nImplements Brace Expansion as described in\n`bash(1) `__,\nwith the following limitations:\n\n- A pattern containing unbalanced braces will raise an\n ``UnbalancedBracesError`` exception. In bash, unbalanced braces will\n either be partly expanded or ignored.\n\n- A mixed-case character range like ``'{Z..a}'`` or ``'{a..Z}'`` will\n not include the characters :literal:`[]^_\\`` between ``Z`` and ``a``.\n\n``braceexpand`` is tested with Python 2.7, and 3.5+\n\nInstallation\n------------\n\nInstall the ``braceexpand`` package from pypi:\n\n::\n\n $ pip install braceexpand\n\nExamples\n--------\n\nThe ``braceexpand`` function returns an iterator over the expansions\ngenerated from a pattern.\n\n.. code:: python\n\n >>> from braceexpand import braceexpand\n\n # Integer range\n >>> list(braceexpand('item{1..3}'))\n ['item1', 'item2', 'item3']\n\n # Character range\n >>> list(braceexpand('{a..c}'))\n ['a', 'b', 'c']\n\n # Sequence\n >>> list(braceexpand('index.html{,.backup}'))\n ['index.html', 'index.html.backup']\n\n # Nested patterns\n >>> list(braceexpand('python{2.{5..7},3.{2,3}}'))\n ['python2.5', 'python2.6', 'python2.7', 'python3.2', 'python3.3']\n\n # Prefixing an integer with zero causes all numbers to be padded to\n # the same width.\n >>> list(braceexpand('{07..10}'))\n ['07', '08', '09', '10']\n\n # An optional increment can be specified for ranges.\n >>> list(braceexpand('{a..g..2}'))\n ['a', 'c', 'e', 'g']\n\n # Ranges can go in both directions.\n >>> list(braceexpand('{4..1}'))\n ['4', '3', '2', '1']\n\n # Unbalanced braces raise an exception.\n >>> list(braceexpand('{1{2,3}'))\n Traceback (most recent call last):\n ...\n UnbalancedBracesError: Unbalanced braces: '{1{2,3}'\n\n # By default, the backslash is the escape character.\n >>> list(braceexpand(r'{1\\{2,3}'))\n ['1{2', '3']\n\n # Setting 'escape' to False disables backslash escaping.\n >>> list(braceexpand(r'\\{1,2}', escape=False))\n ['\\\\1', '\\\\2']\n\nLicense\n-------\n\nbraceexpand is licensed unter the MIT License. See the included file\n``LICENSE`` for details.\n\n.. |build-status-img| image:: https://travis-ci.org/trendels/braceexpand.svg\n :target: https://travis-ci.org/trendels/braceexpand", "description_content_type": "", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/trendels/braceexpand", "keywords": "", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "braceexpand", "package_url": "https://pypi.org/project/braceexpand/", "platform": "", "project_url": "https://pypi.org/project/braceexpand/", "project_urls": { "Homepage": "https://github.com/trendels/braceexpand" }, "release_url": "https://pypi.org/project/braceexpand/0.1.3/", "requires_dist": null, "requires_python": "", "summary": "Bash-style brace expansion for Python", "version": "0.1.3" }, "last_serial": 5922594, "releases": { "0.1": [ { "comment_text": "", "digests": { "md5": "233a300edb5cd8927ad977210ab76bc2", "sha256": "045a9f12a63ea137f20224c5aabdb4d2e57cb44f9e9ccbbf97572935a6d41818" }, "downloads": -1, "filename": "braceexpand-0.1.tar.gz", "has_sig": false, "md5_digest": "233a300edb5cd8927ad977210ab76bc2", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5335, "upload_time": "2015-01-06T12:18:11", "url": "https://files.pythonhosted.org/packages/a8/82/307c9b2e81cbc7fba7e202f0fa6f3e9494a4785569fe5f2fd279c424ce55/braceexpand-0.1.tar.gz" } ], "0.1.1": [ { "comment_text": "", "digests": { "md5": "ee78733bc649894af478aae037575dbf", "sha256": "f967ca39bdb98e16299a69c45a944c5d4345393615ed6470bb1e62ca3506bf41" }, "downloads": -1, "filename": "braceexpand-0.1.1.tar.gz", "has_sig": false, "md5_digest": "ee78733bc649894af478aae037575dbf", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5786, "upload_time": "2015-01-10T11:11:49", "url": "https://files.pythonhosted.org/packages/93/39/b49b7103008b5d0348a5ca9a908759ef1c778209b19203608dda9d62da72/braceexpand-0.1.1.tar.gz" } ], "0.1.2": [ { "comment_text": "", "digests": { "md5": "0a4504d5c2e3d70bff08aa861e24193d", "sha256": "13980ad19c80ed6097c245febb694e57baffd8179b50bc80437003eb01465ecb" }, "downloads": -1, "filename": "braceexpand-0.1.2.tar.gz", "has_sig": false, "md5_digest": "0a4504d5c2e3d70bff08aa861e24193d", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5875, "upload_time": "2015-08-31T21:28:26", "url": "https://files.pythonhosted.org/packages/c0/d5/b4115864c5870bb262574cee40d0e0c15c77eb4c00a5d901c77b8a9bb091/braceexpand-0.1.2.tar.gz" } ], "0.1.3": [ { "comment_text": "", "digests": { "md5": "4ef1dcafe7fb803a822c0152d8c755cf", "sha256": "84f31e7211ff626c394ebf46854483e53a8c581557d38d390a6c63b967c30505" }, "downloads": -1, "filename": "braceexpand-0.1.3.tar.gz", "has_sig": false, "md5_digest": "4ef1dcafe7fb803a822c0152d8c755cf", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6253, "upload_time": "2019-10-03T09:35:47", "url": "https://files.pythonhosted.org/packages/63/4d/4f652cf14af5fe4a9eb6ca02b99bf128d039f4338da844e7fd58ff1fdfa3/braceexpand-0.1.3.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "4ef1dcafe7fb803a822c0152d8c755cf", "sha256": "84f31e7211ff626c394ebf46854483e53a8c581557d38d390a6c63b967c30505" }, "downloads": -1, "filename": "braceexpand-0.1.3.tar.gz", "has_sig": false, "md5_digest": "4ef1dcafe7fb803a822c0152d8c755cf", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6253, "upload_time": "2019-10-03T09:35:47", "url": "https://files.pythonhosted.org/packages/63/4d/4f652cf14af5fe4a9eb6ca02b99bf128d039f4338da844e7fd58ff1fdfa3/braceexpand-0.1.3.tar.gz" } ] }