Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/shpaker/epyxid
Python wrapper around Rust implementation of XID (Globally Unique ID Generator)
https://github.com/shpaker/epyxid
pyo3 python rust xid
Last synced: about 2 months ago
JSON representation
Python wrapper around Rust implementation of XID (Globally Unique ID Generator)
- Host: GitHub
- URL: https://github.com/shpaker/epyxid
- Owner: shpaker
- License: mit
- Created: 2024-03-02T09:32:10.000Z (10 months ago)
- Default Branch: main
- Last Pushed: 2024-05-12T10:04:39.000Z (7 months ago)
- Last Synced: 2024-10-15T21:12:51.820Z (2 months ago)
- Topics: pyo3, python, rust, xid
- Language: Rust
- Homepage:
- Size: 32.2 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# ePyXID
[![PyPI](https://img.shields.io/pypi/v/epyxid.svg)](https://pypi.python.org/pypi/epyxid)
Fast globally unique sortable id generator.
Python wrapper around Rust implementation of xid https://github.com/kazk/xid-rs
## Install
```shell
pip install epyxid
```## Usage
```python
from epyxid import XID, xid_createxid: XID = xid_create()
print(xid)
# cnisffq7qo0qnbtbu5gg
print(bytes(xid))
# b'e\xe5\xc7\xbfG\xd6\x01\xab\xaf\xab\xf1a'
print(xid.time)
# 2024-03-04 16:08:15
```