Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/cesiumlabs/canvacord.py
Asynchronous image manipulation helper library built on good intentions.
https://github.com/cesiumlabs/canvacord.py
hacktoberfest image image-manipulation image-processing memes
Last synced: about 1 month ago
JSON representation
Asynchronous image manipulation helper library built on good intentions.
- Host: GitHub
- URL: https://github.com/cesiumlabs/canvacord.py
- Owner: CesiumLabs
- License: mit
- Created: 2021-06-18T09:34:43.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2021-08-19T09:00:42.000Z (over 3 years ago)
- Last Synced: 2023-03-09T01:06:07.678Z (almost 2 years ago)
- Topics: hacktoberfest, image, image-manipulation, image-processing, memes
- Language: Python
- Homepage:
- Size: 7.47 MB
- Stars: 10
- Watchers: 2
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
# Canvacord.py
A Python implementation of the [canvacord](https://github.com/DevSnowflake/canvacord)
library.[![made-with-python](https://img.shields.io/badge/Made%20with-Python-1f425f.svg)](https://www.python.org/)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
# Usage
To install the library (not on pypi yet), run:
```py
# windows
py -m pip install canvacord# macos/linux
python3 -m pip install canvacord
```For the dev version do:
```
git clone https://github.com/DevSnowflake/canvacord-py
cd canvacord-py
```# Quick Start
```python
from canvacord.core import Canvacord
import ioasync def jokeoverhead(avatar: str) -> io.BytesIO:
cc = Canvacord()
data = await cc.fun.jokeoverhead(avatar)
cc.async_session.close() # close the session
return data
```Or, if you already have an aiohttp session:
```python
from canvacord.core import Canvacord
import io
import aiohttpasync def jokeoverhead(avatar: str) -> io.BytesIO:
async with aiohttp.ClientSession() as session:
cc = Canvacord(session)
data = await cc.fun.jokeoverhead(avatar)
# cc.async_session.close() no need to close since it's a context manager
return data
```# FAQ
### I would like to contribute, how do I help?
- You may open an issue or find an issue, fork the repo, make changes and submit an PR request. Please ensure your code
follows `CONTRIBUTING.md`
### I am getting unclosed aiohttp sessions
- If you are only seeing the warning, please access the async_session attr from Canvacord and close it yourself, as seen
in quick start. You may also use a context manager, as well seen in quick-start.
### Where can I get support?
- Please join this discord and head over to #canvacord-py, https://discord.gg/34VH3yPfkY