Fully asynchronous Python library for carbon.now.sh
Project description
py-carbon
![Badge 2](https://pypi-camo.freetls.fastly.net/d8b7643fbbd4efbcb3e927b1970d780da7330a88/68747470733a2f2f696d672e736869656c64732e696f2f707970692f646d2f70792d636172626f6e3f636f6c6f723d333737364142266c6f676f3d707974686f6e267374796c653d666f722d7468652d6261646765)
Fully asynchronous Python library for carbon.now.sh
Installation
$ pip install py-carbon
A quick example
In this example we'll create a carbon image and save it to disk.
import carbon
import asyncio
loop = asyncio.get_event_loop() # Setting up asyncio
code = """
defmodule Something do
def anything() do
IO.puts "Hello, World"
end
end
""" # Any kind of code-block in any language
options = carbon.CarbonOptions(code)
cb = carbon.Carbon()
image = loop.run_until_complete(cb.generate(options)) # Returns a CarbonImage object
loop.run_until_complete(image.save('something-script'))
And it'll output something like this:
Contributing
This package is opensource so anyone with adequate python experience can contribute to this project!
Reporting Issues
If you find any error/bug/mistake with the package or in the code feel free to create an issue and report it here.
Fixing/Editing Content
If you want to contribute to this package, fork the repository, make your changes and then simply create a Pull Request!
Contact
If you want to contact me:
Mail - paul@przybyszewski.me
Discord - wulf
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
py-carbon-1.0.3.tar.gz
(5.3 kB
view hashes)
Built Distribution
Close
Hashes for py_carbon-1.0.3-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b8cee19f9d59068435a190d1ad54d7298ec7b1a43554dafbac014bd169046475 |
|
MD5 | 7c610a0612c23bce53e41e863d55cf0c |
|
BLAKE2b-256 | 40bd7d2e574ad833fae91b00540b15ad100c6edf9a52b3662e30b3b1a8470e5c |