Skip to main content

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.

BUILT WITH SWAG MADE WITH PYTHON FIXED BUGS

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

document = imperial.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.exceptions.DocumentNotFound("We couldn't find that document!")

Imperial Class

from imperial 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

  1. Fork the repo on GitHub
  2. Clone the project to your own machine
  3. Commit changes to your own branch
  4. Push your work to your fork
  5. Submit a Pull request so that I can review your changes

Metadata

Release files for imperial.py 2.0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for imperial.py 2.0.1
File Size Uploaded
imperial.py-2.0.1.tar.gz 22.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for imperial.py 2.0.1
File Interpreter ABI Platform
imperial.py-2.0.1-py3-none-any.whl Python 3 none any Details

Total release size: 52.0 kB

Release files / imperial.py-2.0.1.tar.gz

Download URL imperial.py-2.0.1.tar.gz
Size 22.3 kB
Tags Source
SHA-256 checksum
How to use checksums
43df0ab4c576252b829c8510a43a4f2cbd6650cb900cf84773a1807b03c178d8
BLAKE2b-256 checksum
How to use checksums
2a44f1340b8f3899f9f35ba2d1ad9fe7095055ee4651b981dcbd2298108b29c1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.2 CPython/3.9.6

Release files / imperial.py-2.0.1-py3-none-any.whl

Download URL imperial.py-2.0.1-py3-none-any.whl
Size 29.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
5ac37e9d89495d86c584ca683fd0b3e088594436ae0ce5e573f8eb98f854e385
BLAKE2b-256 checksum
How to use checksums
ed6c9def7ba6d19f99ed625cd7e606097c503f319d428b47c06eb91e6158284c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.2 CPython/3.9.6

Release history Release notifications | RSS feed

This release

2.0.1 This release

2 release files

2.0.0

2 release files

1.0.6

2 release files

1.0.5

3 release files

1.0.4

1 release file

1.0.3

1 release file

1.0.2

2 release files

1.0.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page