Python API wrapper for api.awau.moe
Project description
# owo.py
A wrapper that was written inside of Python that allows for you to upload images to the owo.whats-th.is and shorten URLs through uwu.whats-th.is. Allows for both methods through Async and Non-Async. (Suppports py2)
# Instructions
1. Gain a API key in order to be actually able to use the service.
2. Run the command `pip install owo`.
3. Check the usage below to find some basic examples of how to use the script.
### Mobile Devices
For use on Android devices using [Termux](https://termux.com/), the Termux:API package is required to use the background monitor.
You will need to install using your device's app store AND by running `$ apt install termux-tools termux-api`
**It is also REQUIRED to do the following after installing, or it will not work!**
```bash
$ owo-fix
```
The background monitor watches for new files in a directory (usually a screenshots folder) and uploads those new files.
The program accepts several command-line flags.
```
$ owo-bg --help
usage: bg.py [-h] [-p PATH] -k KEY [-u URL] [-tts]
optional arguments:
-h, --help show this help message and exit
-p PATH, --path PATH Path to check file updates
-k KEY, --key KEY API Key
-u URL, --url URL Base vanity url to use
-tts Confirm message over tts | Mobile only
```
The base url can be any of the owo.whats-th.is vanity urls.
**Example Use**
`$ owo-bg -p "/storage/Pictures/Screenshots" -k "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" -u "https://i.am-a.ninja/"`
This starts a background task monitoring `/storage/Pictures/Screenshots/` for new files, uploads those files and returns the link, using the vanity url [https://i.am-a.ninja/](https://i.am-a.ninja/)
# Usage
Basic usage of the script is like so.
**Image Uploading**
```python
import owo
owo.upload_files(API_KEY, "file.png", "file.py")
```
returns something like..
```python
{"file.png": "url", "file.py": "url"}
```
**URL Shortening**
```python
import owo
owo.shorten_urls(API_KEY, "url1","url2")
```
returns something like..
```python
["shortened url 1","shortened url 2"]
```
For more powerful/better examples please check /examples/.
# Contribute
1. Fork repo.
2. Edit code.
3. Make a PR.
4. Submit said PR.
# License
A copy of the MIT license can be found in `LICENSE.md`.
A wrapper that was written inside of Python that allows for you to upload images to the owo.whats-th.is and shorten URLs through uwu.whats-th.is. Allows for both methods through Async and Non-Async. (Suppports py2)
# Instructions
1. Gain a API key in order to be actually able to use the service.
2. Run the command `pip install owo`.
3. Check the usage below to find some basic examples of how to use the script.
### Mobile Devices
For use on Android devices using [Termux](https://termux.com/), the Termux:API package is required to use the background monitor.
You will need to install using your device's app store AND by running `$ apt install termux-tools termux-api`
**It is also REQUIRED to do the following after installing, or it will not work!**
```bash
$ owo-fix
```
The background monitor watches for new files in a directory (usually a screenshots folder) and uploads those new files.
The program accepts several command-line flags.
```
$ owo-bg --help
usage: bg.py [-h] [-p PATH] -k KEY [-u URL] [-tts]
optional arguments:
-h, --help show this help message and exit
-p PATH, --path PATH Path to check file updates
-k KEY, --key KEY API Key
-u URL, --url URL Base vanity url to use
-tts Confirm message over tts | Mobile only
```
The base url can be any of the owo.whats-th.is vanity urls.
**Example Use**
`$ owo-bg -p "/storage/Pictures/Screenshots" -k "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" -u "https://i.am-a.ninja/"`
This starts a background task monitoring `/storage/Pictures/Screenshots/` for new files, uploads those files and returns the link, using the vanity url [https://i.am-a.ninja/](https://i.am-a.ninja/)
# Usage
Basic usage of the script is like so.
**Image Uploading**
```python
import owo
owo.upload_files(API_KEY, "file.png", "file.py")
```
returns something like..
```python
{"file.png": "url", "file.py": "url"}
```
**URL Shortening**
```python
import owo
owo.shorten_urls(API_KEY, "url1","url2")
```
returns something like..
```python
["shortened url 1","shortened url 2"]
```
For more powerful/better examples please check /examples/.
# Contribute
1. Fork repo.
2. Edit code.
3. Make a PR.
4. Submit said PR.
# License
A copy of the MIT license can be found in `LICENSE.md`.
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
owo-2.2.2.tar.gz
(6.6 kB
view details)
Built Distributions
owo-2.2.2-py3.6.egg
(19.5 kB
view details)
owo-2.2.2-py3-none-any.whl
(11.5 kB
view details)
File details
Details for the file owo-2.2.2.tar.gz
.
File metadata
- Download URL: owo-2.2.2.tar.gz
- Upload date:
- Size: 6.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | acb35fb0963a43717fdc17843bd9cc9d48e6de952ff9e4a379d8c50b9e90c65f |
|
MD5 | 1170ec35b63be8df0e246efa75a3e70f |
|
BLAKE2b-256 | e58c0bbb960c3463e32c38905f5953e53b2df7627c8428a8a79844bdea0bd6e2 |
File details
Details for the file owo-2.2.2-py3.6.egg
.
File metadata
- Download URL: owo-2.2.2-py3.6.egg
- Upload date:
- Size: 19.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f4632a3ccc1a8020cf47131bc79f4888714237ececf9fb37341c07d56cf910b2 |
|
MD5 | cd833cc3357c94bbb4623dac1db09526 |
|
BLAKE2b-256 | 403aefbfb4e9ddd31fcb3dc6f434c72265295d4caf113618b90d904c3c53ee94 |
File details
Details for the file owo-2.2.2-py3-none-any.whl
.
File metadata
- Download URL: owo-2.2.2-py3-none-any.whl
- Upload date:
- Size: 11.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1f080d6887a61f46f3921ed1bfe8649d48291e1243323cc35819cf687a143d46 |
|
MD5 | 34c7b742a3abc893ed7630c16162efb6 |
|
BLAKE2b-256 | 27d7be617f82a6799318ed0681ce9f0084b655518c6ff3603dc448abd3b3f410 |