Simple API wrapper for paste.myst.rs written in Python
Project description
PasteMyst.py
(https://paste.myst.rs)[paste.myst.rs] API wrapper written in Python.
Requirements
Here's the libraries used to create the wrapper:
- json
- requests
- urllib
- datetime
Functions
create_paste_myst(code: str, expires_in: str = 'never', language: str = None)
Alias:
CreatePasteMyst(..)
This function creates a new PasteMyst and returns aPasteMystInfo
object
get_paste_myst(id: str)
Alias:
GetPasteMyst(..)
This function gets an exisiting PasteMyst by an id. It returns the RespondingPasteMystInfo
object
Objects
PasteMystInfo
Here's a table of the classes contents
Variable | Type | Alias | Description |
---|---|---|---|
id | str | ID | This is the PasteMyst's ID. Use this to access the PasteMyst again |
created_at | datetime | CreatedAt | This holds the exact date and time the PasteMyst was created at |
code | str | Code | This is the code, the PasteMyst contains |
expires_in | str | ExpiresIn | This is when the PasteMyst will expire and be deleted |
language | str | Language | The target programming language of the PasteMyst |
url | str | URL | The exact URL to get to the PasteMyst |
Contribution
Feel free to make a pull request! All help is appreciated!
License
This repo is licensed under the MIT license
Maintainers
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
pastemyst-1.0.tar.gz
(2.7 kB
view hashes)