Computerender Python Client
Python client for using the computerender API.
Updates
- v0.1: Improved Error handling
- v0.0: Img2img!
Installation
$ pip install computerender
Examples
from computerender import Computerender
import asyncio
cr = Computerender()
# Generate image and save to file
with open("cow.jpg", "wb") as f:
img_bytes = asyncio.run(cr.generate("a cow wearing sunglasses"))
f.write(img_bytes)
# Generate image with custom parameters
img_bytes = asyncio.run(cr.generate("testing", w=1024, h=384, iterations=20))
# img2img generation reading from and writing to files
with open("cow.jpg", "rb") as in_f:
img_bytes = asyncio.run(
cr.generate(
"van gogh painting of a cow wearing sunglasses",
img=in_f.read()
)
)
with open("van_gogh_cow.jpg", "wb") as out_f:
out_f.write(img_bytes)
# img2img one-liner reading and writing to file
open("fly.jpg", "wb").write(asyncio.run(cr.generate("fly", img=open("cow.jpg", "rb").read())))
# Generate image and use it for img2img without saving anything to files
img_bytes = asyncio.run(
cr.generate("testing", w=1024, h=384, iterations=20)
)
result_bytes = asyncio.run(
cr.generate("testing style transfer", img=img_bytes)
)
"a cow wearing sunglasses"
"van gogh painting of a cow wearing sunglasses"
License
Distributed under the terms of the [MIT license][license]
Metadata
Release files for computerender 0.1.4
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| computerender-0.1.4.tar.gz | 4.6 kB | Without provenance | Details for computerender-0.1.4.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| computerender-0.1.4-py3-none-any.whl | Python 3 | none | any | Details for computerender-0.1.4-py3-none-any.whl |
Total release size: 9.3 kB
Release files / computerender-0.1.4.tar.gz
| Download URL | computerender-0.1.4.tar.gz |
|---|---|
| Size | 4.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
8aba6859d4f985160d6535e3609efe84a4e006c6656930958d674e6ace881e43
|
|
BLAKE2b-256 checksum How to use checksums |
43c1dd76ae66c32359c5075dd51b1df23e49d06e025b5d383f2e6f359cd07af6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.11.1
|
Release files / computerender-0.1.4-py3-none-any.whl
| Download URL | computerender-0.1.4-py3-none-any.whl |
|---|---|
| Size | 4.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
949269261693efac3475c022b7f7bd12cffba9faf4fbf6ee3ef91d5e2f9feca0
|
|
BLAKE2b-256 checksum How to use checksums |
afad1cdd9ae0308427725b342e08bd1ee2109104683ae53a145d9a6cc5f79492
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.11.1
|
Security for computerender 0.1.4
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.