ImperialBin is a hastebin alternative built with UI and user experience in mind.
Project description
Imperial-py README
ImperialBin is a hastebin alternative built with UI and user experience in mind.
Connect With Us!
Endpoints
/api/PostCode
>post_code()
/api/getCode
>get_code()
/api/checkApiToken/:apiToken
>verify()
/api/getShareXConfig/:apiToken
>get_sharex_config()
Example Usage
from imperial_py import Imperial
imp = Imperial() # with or without api token
imp.post_code("Hello World!")
>>> {'success': True, 'document_id': 'bmhn60klmpw', 'raw_link': 'https://www.imperialb.in/r/bmhn60klmpw', 'formatted_link': 'https://www.imperialb.in/p/bmhn60klmpw', 'expires_in': datetime.datetime(2021, 1, 29, 18, 55, 37, 725000), 'instant_delete': False}
imp.get_code("bmhn60klmpw")
>>> {'success': True, 'document': 'Hello World!'}
Python Exclusives
- camelCase json response is converted to snake_case (except sharex config)
expires_in
: dict key gets converted from an isoformat string to a datetime object
Docs
To get full docs, refer to imperial documentation. To view what goes on with imperial-py, view the full code. Every function has docstrings, and a description for increased readability.
Contibuting
Either send contributions in the discord or open a pull request. If you suggest a change, make sure it's backwards compatible. I believe right now, we are python 3.5 and up, but this will need more testing.
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
imperial-py-1.0.0.tar.gz
(4.0 kB
view hashes)
Built Distribution
Close
Hashes for imperial_py-1.0.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0b5006ff02fddb42e4bb9fa52f3ced63c33eea0cb4f55abe80e3374c8f040446 |
|
MD5 | 87a40ecefb956e3c872a7fee121f9227 |
|
BLAKE2b-256 | f7b70d7fe21824052b897a188409f6538248a1436f6a77c960b2ccd0aa906f4d |