ImperialBin is a hastebin alternative built with UI and user experience in mind.
Project description
imperial-py
imperialbin is a code/text sharing site with the user experience in mind, it has feautures such as editing, encryption and integration with github gists and discord.
API Token
An API Token is not required, but you can't do most things without one. Add IMPERIAL_TOKEN
to path to set it
automatically; this will get overwritten by setting one manually.
Example Usage
Shorthand Functions are more optimal if you have your API token set as an environmental variable.
Shorthand Functions
import imperial_py
document = imperial_py.create_document("Hello, World!")
# document.content is "Hello, World!"
document.edit("Hello from Python!")
# document.content is "Hello from Python!"
document.delete()
# document is deleted off imperial servers,
# but information about the document still lives in the object
document.edit("This will raise an error!")
# imperial_py.exceptions.DocumentNotFound("We couldn't find that document!")
Imperial Class
from imperial_py import Imperial
imp = Imperial("IMPERIAL-00000000-0000-0000-0000-000000000000")
document = imp.create_document("Hello, World!")
# etc...
Documentation
Refer to imperial documentation for full docs.
To see what goes on with imperial-py,
view the full code. All important functions have docstrings and a description.
Contributing
- Fork the repo on GitHub
- Clone the project to your own machine
- Commit changes to your own branch
- Push your work to your fork
- Submit a Pull request so that I can review your changes
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
Built Distribution
Hashes for imperial_py-2.0.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5c013ae596b53fd790a938a7d5bce99b590bb82feced4791009919128b7342a5 |
|
MD5 | 84053e03bbdc54be6d1a22212e4254c6 |
|
BLAKE2b-256 | 8e0c0c078706387f033f2e36b5515b525d53fe11dae2cd2e5a6b9fb792eae51c |