Skip to main content

Pomf.se clone uploader

Project description

# 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')
```

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

pomf-0.6.tar.gz (3.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pomf-0.6-py3-none-any.whl (6.6 kB view details)

Uploaded Python 3

File details

Details for the file pomf-0.6.tar.gz.

File metadata

  • Download URL: pomf-0.6.tar.gz
  • Upload date:
  • Size: 3.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for pomf-0.6.tar.gz
Algorithm Hash digest
SHA256 127e62d3f654797dd42091169ba0f1aefee0a088a78e5201fdbb0f305bfae0a7
MD5 4ca7122be92cbe1dacc256c03dd20213
BLAKE2b-256 de78a616fe927ac2319994ecff96ebafd07c51169232370935cbd03498a0ce9d

See more details on using hashes here.

File details

Details for the file pomf-0.6-py3-none-any.whl.

File metadata

  • Download URL: pomf-0.6-py3-none-any.whl
  • Upload date:
  • Size: 6.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for pomf-0.6-py3-none-any.whl
Algorithm Hash digest
SHA256 38e221197659da41ed7c67f2c537275afc3d9a7e921ab5973fce5eebc7786ef9
MD5 642a49d179bce3c33f342567267f7d19
BLAKE2b-256 5f8eec04126a60617920077737fe4b847da0988ea336ec801eae174bfdcd6f18

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page