# cookiesparser
[![GitHub](https://img.shields.io/github/license/farhaanaliii/cookiesparser)](https://github.com/farhaanaliii/cookiesparser/blob/main/LICENSE)
[![GitHub release (latest by date)](https://img.shields.io/github/v/release/farhaanaliii/cookiesparser)](https://github.com/farhaanaliii/cookiesparser/releases)
[![PyPI](https://img.shields.io/pypi/v/cookiesparser)](https://pypi.org/project/cookiesparser/)
# Description
**cookiesparser** is a mini module for parsing cookies 🍪✨. This basic but super useful tool allows you to easily extract and encode cookies from strings.
# Installation
You can install cookiesparser using pip:
```
pip install cookiesparser
```
# Usage
```python
import cookiesparser as cparser
c = "token=xyz789; userId=42; color=blue;"
parsed = cparser.parse(c)
encoded = cparser.encode(parsed)
token = cparser.get_cookie(c, "token")
print(f"Orignal: {c}")
print(f"Parsed: {parsed}")
print(f"Encoded: {encoded}")
print(f"Token: {token}")
```
# Output
```
Orignal: token=xyz789; userId=42; color=blue;
Parsed: {'token': 'xyz789', 'userId': '42'}
Encoded: token=xyz789; userId=42
Token: xyz789
```
# Contributing
Contributions are welcome! If you encounter any issues or have suggestions for improvements, please feel free to open an issue or submit a pull request on the [GitHub repository](https://github.com/farhaanaliii/cookiesparser).
# License
cookiesparser is released under the [Apache License](https://github.com/farhaanaliii/cookiesparser/blob/main/LICENSE).
Raw data
{
"_id": null,
"home_page": null,
"name": "cookiesparser",
"maintainer": null,
"docs_url": null,
"requires_python": null,
"maintainer_email": null,
"keywords": "cookies, cookie parsing, cookie management, http cookies, web development, python cookies, cookie encoder, cookie decoder, data parsing, string manipulation, mini module, farhan ali",
"author": "Farhan Ali",
"author_email": "i.farhanali.dev@gmail.com",
"download_url": "https://files.pythonhosted.org/packages/1a/74/64911da610dd96d1ced935e3ee9027e7bea3197728cfc5e800cf3902e2cc/cookiesparser-1.4.0.tar.gz",
"platform": null,
"description": "# cookiesparser\n\n[![GitHub](https://img.shields.io/github/license/farhaanaliii/cookiesparser)](https://github.com/farhaanaliii/cookiesparser/blob/main/LICENSE)\n[![GitHub release (latest by date)](https://img.shields.io/github/v/release/farhaanaliii/cookiesparser)](https://github.com/farhaanaliii/cookiesparser/releases)\n[![PyPI](https://img.shields.io/pypi/v/cookiesparser)](https://pypi.org/project/cookiesparser/)\n\n# Description\n**cookiesparser** is a mini module for parsing cookies \ud83c\udf6a\u2728. This basic but super useful tool allows you to easily extract and encode cookies from strings.\n\n# Installation\nYou can install cookiesparser using pip:\n```\npip install cookiesparser\n```\n\n# Usage\n```python\nimport cookiesparser as cparser\n\nc = \"token=xyz789; userId=42; color=blue;\"\nparsed = cparser.parse(c)\nencoded = cparser.encode(parsed)\ntoken = cparser.get_cookie(c, \"token\")\nprint(f\"Orignal: {c}\")\nprint(f\"Parsed: {parsed}\")\nprint(f\"Encoded: {encoded}\")\nprint(f\"Token: {token}\")\n```\n # Output\n ```\nOrignal: token=xyz789; userId=42; color=blue;\nParsed: {'token': 'xyz789', 'userId': '42'}\nEncoded: token=xyz789; userId=42\nToken: xyz789\n```\n\n# Contributing\nContributions are welcome! If you encounter any issues or have suggestions for improvements, please feel free to open an issue or submit a pull request on the [GitHub repository](https://github.com/farhaanaliii/cookiesparser).\n\n# License\ncookiesparser is released under the [Apache License](https://github.com/farhaanaliii/cookiesparser/blob/main/LICENSE).\n",
"bugtrack_url": null,
"license": null,
"summary": "cookiesparser is a mini module for parsing cookies.",
"version": "1.4.0",
"project_urls": null,
"split_keywords": [
"cookies",
" cookie parsing",
" cookie management",
" http cookies",
" web development",
" python cookies",
" cookie encoder",
" cookie decoder",
" data parsing",
" string manipulation",
" mini module",
" farhan ali"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "14f3ecff5849b37f90751f6cc7497be4b6c65e188b6424c150ed7c5eafa9e7ce",
"md5": "295d42ef7c9c9a012e862f097ae0026f",
"sha256": "4b1f0feeab0ba0dc8a0d81bbed240e5ab8b82e50bae7f0a4dab4f902ba582711"
},
"downloads": -1,
"filename": "cookiesparser-1.4.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "295d42ef7c9c9a012e862f097ae0026f",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": null,
"size": 7891,
"upload_time": "2025-01-01T14:41:07",
"upload_time_iso_8601": "2025-01-01T14:41:07.293072Z",
"url": "https://files.pythonhosted.org/packages/14/f3/ecff5849b37f90751f6cc7497be4b6c65e188b6424c150ed7c5eafa9e7ce/cookiesparser-1.4.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "1a7464911da610dd96d1ced935e3ee9027e7bea3197728cfc5e800cf3902e2cc",
"md5": "30a26933bcaef445815c8626c9fc21b5",
"sha256": "52f6a3941c64020d654acb902063b5d6ca4d241874ec4a4704d243a4c6159bb0"
},
"downloads": -1,
"filename": "cookiesparser-1.4.0.tar.gz",
"has_sig": false,
"md5_digest": "30a26933bcaef445815c8626c9fc21b5",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 6994,
"upload_time": "2025-01-01T14:41:08",
"upload_time_iso_8601": "2025-01-01T14:41:08.720240Z",
"url": "https://files.pythonhosted.org/packages/1a/74/64911da610dd96d1ced935e3ee9027e7bea3197728cfc5e800cf3902e2cc/cookiesparser-1.4.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-01-01 14:41:08",
"github": false,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"lcname": "cookiesparser"
}