# Python ShortId and SnowflakeId
`short_id` is a Python 3 library that provides an easy way to generate a short unique id in an orderly way using the snowflake id generation method
* short id with ordered way
* snowflake id as ordered unique number
* short id with more unique without order
`short_id` hosted on [PyPI](http://pypi.python.org/pypi/ShortId/) and can be installed as such:
pip install install ShortId
Alternatively, you can also get the latest source code from [Github](https://github.com/Purushot14/ShortId) and install it manually.
```python3
import short_id
unique_id :str = short_id.generate_short_id()
snowflake_id :int = short_id.get_next_snowflake_id()
# To increase id accuracy need to send a mult value the default value is 10000
# and based on this mult value the id length and accuracy will change
unique_id :str = short_id.generate_short_id(1000000)
snowflake_id :int = short_id.get_next_snowflake_id(1000000)
```
Running Tests
_____________
python -m unittest discover
Changelog
__________
### Version 0.1.2
* Initial release
Raw data
{
"_id": null,
"home_page": "https://github.com/Purushot14/ShortId",
"name": "short-unique-id",
"maintainer": "",
"docs_url": null,
"requires_python": ">=3.6",
"maintainer_email": "",
"keywords": "short,id,uuid,shortid,SnowflakeId,short uuid,tinyid,unique id",
"author": "Purushot14",
"author_email": "prakash.purushoth@gmail.com",
"download_url": "https://files.pythonhosted.org/packages/7f/4f/79811f6c5a6cd626384b4cce6206e2f3884b085d932047df71e866772ae1/short-unique-id-0.1.2.tar.gz",
"platform": null,
"description": "# Python ShortId and SnowflakeId\n\n`short_id` is a Python 3 library that provides an easy way to generate a short unique id in an orderly way using the snowflake id generation method \n* short id with ordered way\n* snowflake id as ordered unique number\n* short id with more unique without order\n\n`short_id` hosted on [PyPI](http://pypi.python.org/pypi/ShortId/) and can be installed as such:\n\n\n pip install install ShortId\n\nAlternatively, you can also get the latest source code from [Github](https://github.com/Purushot14/ShortId) and install it manually.\n\n```python3 \nimport short_id\nunique_id :str = short_id.generate_short_id()\nsnowflake_id :int = short_id.get_next_snowflake_id()\n\n # To increase id accuracy need to send a mult value the default value is 10000\n # and based on this mult value the id length and accuracy will change \n unique_id :str = short_id.generate_short_id(1000000)\n snowflake_id :int = short_id.get_next_snowflake_id(1000000)\n```\nRunning Tests\n\n_____________\n\n python -m unittest discover\n\n\nChangelog\n__________\n\n### Version 0.1.2\n\n* Initial release\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "Short id generator",
"version": "0.1.2",
"split_keywords": [
"short",
"id",
"uuid",
"shortid",
"snowflakeid",
"short uuid",
"tinyid",
"unique id"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "475c3c9e9aab8ff248fb5116f12e061bc2d11bc472041572ecca391b86f6e0af",
"md5": "3888c2f381d2d74ede099fa37fa46239",
"sha256": "62cf689a0368809a20e02cced075d18c54a5a1cf161c6743b70f1bb32283abf0"
},
"downloads": -1,
"filename": "short_unique_id-0.1.2-py3-none-any.whl",
"has_sig": false,
"md5_digest": "3888c2f381d2d74ede099fa37fa46239",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.6",
"size": 4636,
"upload_time": "2023-01-20T14:20:40",
"upload_time_iso_8601": "2023-01-20T14:20:40.951516Z",
"url": "https://files.pythonhosted.org/packages/47/5c/3c9e9aab8ff248fb5116f12e061bc2d11bc472041572ecca391b86f6e0af/short_unique_id-0.1.2-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "7f4f79811f6c5a6cd626384b4cce6206e2f3884b085d932047df71e866772ae1",
"md5": "eeb6ae31188bde3f013bdbbeb5d35d56",
"sha256": "7aab5c6e8599ea458d601c18f348938726d8a3636a3eb0b521f81b954aab1c5f"
},
"downloads": -1,
"filename": "short-unique-id-0.1.2.tar.gz",
"has_sig": false,
"md5_digest": "eeb6ae31188bde3f013bdbbeb5d35d56",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.6",
"size": 4147,
"upload_time": "2023-01-20T14:20:42",
"upload_time_iso_8601": "2023-01-20T14:20:42.601595Z",
"url": "https://files.pythonhosted.org/packages/7f/4f/79811f6c5a6cd626384b4cce6206e2f3884b085d932047df71e866772ae1/short-unique-id-0.1.2.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2023-01-20 14:20:42",
"github": true,
"gitlab": false,
"bitbucket": false,
"github_user": "Purushot14",
"github_project": "ShortId",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"lcname": "short-unique-id"
}