THE ORIONIS API
Build with clarity.
Explore the building blocks of an async-first Python framework. Every module, class, and method — connected, searchable, and ready to build with.
package documentation
Undocumented
| Module | functions |
Undocumented |
| Module | repository |
No module docstring; 0/6 constant, 7/7 functions documented |
From __init__.py:
| Class | |
Persist personal access tokens through the Orionis query builder. |
| Function | generate |
Generate the plain text secret of a personal access token. |
| Function | hash |
Derive the value persisted for a personal access token. |
Generate the plain text secret of a personal access token.
| Parameters | |
size:int | Number of random bytes backing the secret. The returned string is longer because it is URL-safe base64 encoded. |
| Returns | |
str | Cryptographically secure random string. secrets is used on purpose: random is not suitable for credentials. |
Derive the value persisted for a personal access token.
Only this digest reaches the database, so a leaked row never exposes a usable credential. SHA-256 is appropriate here because the input is already high entropy random data, unlike a user chosen password.
| Parameters | |
secret:str | Plain text token presented by the client. |
| Returns | |
str | Hexadecimal SHA-256 digest of the secret, 64 characters long. |