python-aidはMisskeyのaid/aidxのPython向けの実装です。
Project description
python-aid
python-aidはMisskeyのaid/aidxの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.1.tar.gz
(3.5 kB
view hashes)
Built Distribution
Close
Hashes for python_aid-0.2.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 74870f71a9827a14e5e4717a4e00455e6ed97184e143f1b4b2addc8df77e079f |
|
MD5 | 41a1733e88b607a0d22de902036e5f53 |
|
BLAKE2b-256 | 542b22c08333a052712c028ca258e8efbb1396eebae02eb1163d7ef5cb22e5a7 |