Skip to content

python-aidはMisskeyのaid/aidxのPython向けの実装です。

License

Notifications You must be signed in to change notification settings

AmaseCocoa/python-aid

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

python-aid

python-aidはMisskeyのaid/aidxのPython向けの実装です。

aidはこの実装、aidxはこの実装に基づいています。

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'))

試す

python-aid sandbox

About

python-aidはMisskeyのaid/aidxのPython向けの実装です。

Topics

Resources

License

Stars

Watchers

Forks

Languages