python-aidはMisskeyのaid/aidxのPython向けの実装です。
Project description
python-aid
python-aid
は、Misskeyで利用可能なIDアルゴリズムを実装して利用できるようにしたPythonライブラリです。
aid/aidxとは?
Misskeyで利用されているID生成アルゴリズムです。ミリ秒単位の精度があります。
Example
aid
from python_aid import aid
generated = aid.genAid()
print("aid: " + generated)
print("time: " + aid.parseAid(generated).strftime('%Y-%m-%d %H:%M:%S.%f'))
With timestamp
from python_aid import aid
generated = aid.genAid(timestamp=1718546963) # 1718546963 = 2024/06/16 23:09:23 (JST)
print("aid: " + generated)
print("time: " + aidx.parseAid(generated).strftime('%Y-%m-%d %H:%M:%S.%f'))
aidx
from python_aid import aidx
generated = aidx.genAidx()
print("aidx: " + generated)
print("time: " + aidx.parseAidx(generated).strftime('%Y-%m-%d %H:%M:%S.%f'))
With timestamp
from python_aid import aidx
generated = aidx.genAidx(timestamp=1718546963) # 1718546963 = 2024/06/16 23:09:23 (JST)
print("aidx: " + generated)
print("time: " + aidx.parseAidx(generated).strftime('%Y-%m-%d %H:%M:%S.%f'))
試す
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
python_aid-0.2.2.tar.gz
(3.4 kB
view details)
Built Distribution
File details
Details for the file python_aid-0.2.2.tar.gz
.
File metadata
- Download URL: python_aid-0.2.2.tar.gz
- Upload date:
- Size: 3.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: pdm/2.19.1 CPython/3.12.6 Windows/10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4af3e27184ad0ea873ca6f5b8fbd22da1fbb45eedeb6a5761c17d25f99d01472 |
|
MD5 | bf3f4585c2217d05b92a74f425aa386a |
|
BLAKE2b-256 | c6fed93083ff19e7644d2d393c9cae533bb5254ac345f764634fd27c167a709f |
File details
Details for the file python_aid-0.2.2-py3-none-any.whl
.
File metadata
- Download URL: python_aid-0.2.2-py3-none-any.whl
- Upload date:
- Size: 4.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: pdm/2.19.1 CPython/3.12.6 Windows/10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3230d5927a586d22f069d0bb8e5eff85d7e6343b02c7ac14700e9b6d1ed4e5d2 |
|
MD5 | a50c843d93aabdc7de8ac69aa9935f06 |
|
BLAKE2b-256 | 3d0c97eb00757664658de2476959182c884c6462bd0ee851e6e1bf793ad8d255 |