# Pomf.py
Pomf.se uploader made in Python3.5+.
This script makes it so you can upload to any pomf.se site, only requiring the url of the site. The script is also small enough to be taken wherever you need it to go, only taking up a single file. This script also needs `requests` but seeing as thats such a widely installed module, i dont think anyone DOESNT have it installed!
## Getting started
To get started with pomf.py first you must have Python 3.5 or higher as it makes use of asyncio. There is a non-async version you can download in the Github if you want to use it on anything below Python3.5.
```py
import pomf
# select a host via get_host.
host = pomf.get_host('mixtape')
# you dont need anything other than a file
# to upload to the host
ret = host.upload(open('hearts.png', 'rb'))
# {'hash': 'f6bb5ef07fe63759ecfac1c81193c5912b96c45b', 'name': 'hearts.png', 'url': 'https://my.mixtape.moe/hsoali.png', 'size': 25553}
# if you want to add a host:
new_host = pomf.add_host('mixtape2', 'https://mixtape.moe')
```
### Asyncio Support
If you want to use pomf.py with asyncio, you can add a `_async` to the upload that will return a coroutine:
```py
await host.upload_async(open('hearts.png', 'rb'))
# {'hash': 'f6bb5ef07fe63759ecfac1c81193c5912b96c45b', 'name': 'hearts.png', 'url': 'https://my.mixtape.moe/hsoali.png', 'size': 25553}
```
### Pre-installed Hosts
Here are the hosts that are ready to be used with the script out of the box.
```py
# mixtape - https://mixtape.moe
pomf.get_host('mixtape')
# safe - https://safe.moe
pomf.get_host('safe')
# void - https://void.cat
pomf.get_host('void')
```
Pomf.se uploader made in Python3.5+.
This script makes it so you can upload to any pomf.se site, only requiring the url of the site. The script is also small enough to be taken wherever you need it to go, only taking up a single file. This script also needs `requests` but seeing as thats such a widely installed module, i dont think anyone DOESNT have it installed!
## Getting started
To get started with pomf.py first you must have Python 3.5 or higher as it makes use of asyncio. There is a non-async version you can download in the Github if you want to use it on anything below Python3.5.
```py
import pomf
# select a host via get_host.
host = pomf.get_host('mixtape')
# you dont need anything other than a file
# to upload to the host
ret = host.upload(open('hearts.png', 'rb'))
# {'hash': 'f6bb5ef07fe63759ecfac1c81193c5912b96c45b', 'name': 'hearts.png', 'url': 'https://my.mixtape.moe/hsoali.png', 'size': 25553}
# if you want to add a host:
new_host = pomf.add_host('mixtape2', 'https://mixtape.moe')
```
### Asyncio Support
If you want to use pomf.py with asyncio, you can add a `_async` to the upload that will return a coroutine:
```py
await host.upload_async(open('hearts.png', 'rb'))
# {'hash': 'f6bb5ef07fe63759ecfac1c81193c5912b96c45b', 'name': 'hearts.png', 'url': 'https://my.mixtape.moe/hsoali.png', 'size': 25553}
```
### Pre-installed Hosts
Here are the hosts that are ready to be used with the script out of the box.
```py
# mixtape - https://mixtape.moe
pomf.get_host('mixtape')
# safe - https://safe.moe
pomf.get_host('safe')
# void - https://void.cat
pomf.get_host('void')
```
Release files for pomf 0.6
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| pomf-0.6.tar.gz | 3.1 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| pomf-0.6-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 9.8 kB
Release files / pomf-0.6.tar.gz
| Download URL | pomf-0.6.tar.gz |
|---|---|
| Size | 3.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
127e62d3f654797dd42091169ba0f1aefee0a088a78e5201fdbb0f305bfae0a7
|
|
BLAKE2b-256 checksum How to use checksums |
de78a616fe927ac2319994ecff96ebafd07c51169232370935cbd03498a0ce9d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Release files / pomf-0.6-py3-none-any.whl
| Download URL | pomf-0.6-py3-none-any.whl |
|---|---|
| Size | 6.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
38e221197659da41ed7c67f2c537275afc3d9a7e921ab5973fce5eebc7786ef9
|
|
BLAKE2b-256 checksum How to use checksums |
5f8eec04126a60617920077737fe4b847da0988ea336ec801eae174bfdcd6f18
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |