Name | younotyou JSON |
Version |
0.1.1
JSON |
| download |
home_page | |
Summary | Filter a list of strings and/or paths based on include and exclude patterns. |
upload_time | 2024-02-17 19:37:32 |
maintainer | |
docs_url | None |
author | |
requires_python | >=3.10 |
license | |
keywords |
filter
filtering
fnmatch
match
path
patternmatching
string
|
VCS |
|
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
# younotyou
Filter a list of strings and/or paths based on include and exclude patterns.
## Installation
Install with:
<pre>
pip install younotyou
</pre>
Convenient one stop shop to include and exclude strings using glob style pattern matching.<br>
## Usage
Patterns can be literals or glob style wildcard strings.<br>
Exclusion patterns override include patterns,
i.e. if an item matches an include pattern but also matches an exclude pattern, it will be excluded.
<pre>
>>> from younotyou import younotyou
>>> strings = ["thispattern", "aPaTtErN", "mypatterns"]
>>> younotyou(strings, ["*pattern"])
['thispattern']
>>> younotyou(strings, ["*pattern*"])
['thispattern', 'mypatterns']
>>> younotyou(strings, ["*pattern*"], case_sensitive=False)
['thispattern', 'aPaTtErN', 'mypatterns']
>>> younotyou(strings, ["*pattern*"], ["my*", "*is*"], case_sensitive=False)
['aPaTtErN']
>>> younotyou(strings, exclude_patterns=["*PaT*"])
['thispattern', 'mypatterns']
>>> younotyou(strings, exclude_patterns=["*PaT*"], case_sensitive=False)
[]
>>> younotyou(strings, include_patterns=["*PaT*"], exclude_patterns=["*PaT*"], case_sensitive=False)
[]
</pre>
Raw data
{
"_id": null,
"home_page": "",
"name": "younotyou",
"maintainer": "",
"docs_url": null,
"requires_python": ">=3.10",
"maintainer_email": "",
"keywords": "filter,filtering,fnmatch,match,path,patternmatching,string",
"author": "",
"author_email": "Matt Manes <mattmanes@pm.me>",
"download_url": "https://files.pythonhosted.org/packages/a5/1c/b9ede2fb1941a51a9031f440da17469607eaba717158520a90ec829c3fa1/younotyou-0.1.1.tar.gz",
"platform": null,
"description": "# younotyou\n\nFilter a list of strings and/or paths based on include and exclude patterns.\n\n## Installation\n\nInstall with:\n\n<pre>\npip install younotyou\n</pre>\n\nConvenient one stop shop to include and exclude strings using glob style pattern matching.<br>\n\n\n## Usage\n\nPatterns can be literals or glob style wildcard strings.<br>\nExclusion patterns override include patterns,\ni.e. if an item matches an include pattern but also matches an exclude pattern, it will be excluded.\n\n<pre>\n>>> from younotyou import younotyou\n>>> strings = [\"thispattern\", \"aPaTtErN\", \"mypatterns\"]\n>>> younotyou(strings, [\"*pattern\"])\n['thispattern']\n>>> younotyou(strings, [\"*pattern*\"])\n['thispattern', 'mypatterns']\n>>> younotyou(strings, [\"*pattern*\"], case_sensitive=False)\n['thispattern', 'aPaTtErN', 'mypatterns']\n>>> younotyou(strings, [\"*pattern*\"], [\"my*\", \"*is*\"], case_sensitive=False)\n['aPaTtErN']\n>>> younotyou(strings, exclude_patterns=[\"*PaT*\"])\n['thispattern', 'mypatterns']\n>>> younotyou(strings, exclude_patterns=[\"*PaT*\"], case_sensitive=False)\n[]\n>>> younotyou(strings, include_patterns=[\"*PaT*\"], exclude_patterns=[\"*PaT*\"], case_sensitive=False)\n[]\n</pre>\n",
"bugtrack_url": null,
"license": "",
"summary": "Filter a list of strings and/or paths based on include and exclude patterns.",
"version": "0.1.1",
"project_urls": {
"Documentation": "https://github.com/matt-manes/younotyou/tree/main/docs",
"Homepage": "https://github.com/matt-manes/younotyou",
"Source code": "https://github.com/matt-manes/younotyou/tree/main/src/younotyou"
},
"split_keywords": [
"filter",
"filtering",
"fnmatch",
"match",
"path",
"patternmatching",
"string"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "77cbec94e81bf1013bd07a232e6913ea2d4c8e1e351d9fe7e144a969a4d91a4e",
"md5": "d89ec1181a709bc3d148428e1b4da89d",
"sha256": "7f22e0d0b436a008c158e1a60bffef0c1d35bee8f2e2c35350e281e41b46076c"
},
"downloads": -1,
"filename": "younotyou-0.1.1-py3-none-any.whl",
"has_sig": false,
"md5_digest": "d89ec1181a709bc3d148428e1b4da89d",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.10",
"size": 3749,
"upload_time": "2024-02-17T19:37:31",
"upload_time_iso_8601": "2024-02-17T19:37:31.600164Z",
"url": "https://files.pythonhosted.org/packages/77/cb/ec94e81bf1013bd07a232e6913ea2d4c8e1e351d9fe7e144a969a4d91a4e/younotyou-0.1.1-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "a51cb9ede2fb1941a51a9031f440da17469607eaba717158520a90ec829c3fa1",
"md5": "1cc020bf6b731cfbcf4e5e9b9a61e266",
"sha256": "ca5af471172a566866a31463882d8930b8d9a355a4d8302d8f76a6f0d2fd4a5b"
},
"downloads": -1,
"filename": "younotyou-0.1.1.tar.gz",
"has_sig": false,
"md5_digest": "1cc020bf6b731cfbcf4e5e9b9a61e266",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.10",
"size": 2878,
"upload_time": "2024-02-17T19:37:32",
"upload_time_iso_8601": "2024-02-17T19:37:32.890716Z",
"url": "https://files.pythonhosted.org/packages/a5/1c/b9ede2fb1941a51a9031f440da17469607eaba717158520a90ec829c3fa1/younotyou-0.1.1.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-02-17 19:37:32",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "matt-manes",
"github_project": "younotyou",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"lcname": "younotyou"
}