Skip to main content

py-carbon Badge Badge 2

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

code = """
defmodule Something do
    def anything() do
        IO.puts "Hello, World"
    end
end
"""  # Any kind of code-block in any language


async def main():
    cb = carbon.Carbon()  # Create a Carbon instance
    opts = carbon.CarbonOptions(code=code)  # Set the options for the image
    image = await cb.generate(opts)  # Generate the image
    await image.save('hello')  # Save the image in png format


asyncio.run(main())

And it'll output something like this:

Carbon Image

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@przybyszew.ski
Discord - wulf

Metadata

Release files for py-carbon 1.0.4

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for py-carbon 1.0.4
File Size Uploaded
py-carbon-1.0.4.tar.gz 5.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for py-carbon 1.0.4
File Interpreter ABI Platform
py_carbon-1.0.4-py3-none-any.whl Python 3 none any Details

Total release size: 13.8 kB

Release files / py-carbon-1.0.4.tar.gz

Download URL py-carbon-1.0.4.tar.gz
Size 5.3 kB
Tags Source
SHA-256 checksum
How to use checksums
b8aa7da66ec9ab3cbc36cd03b58b6ce23bfa8b565756040124158c7757712627
BLAKE2b-256 checksum
How to use checksums
a0e08fd85b41ab6deef48f774fea9193a9116c5a41294ad93a20d173769ab4a6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.0

Release files / py_carbon-1.0.4-py3-none-any.whl

Download URL py_carbon-1.0.4-py3-none-any.whl
Size 8.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
fa7a1398e3abc7ca8ca58fe091d19edbf55ebeea765c57ccfe1a4eadeffe2508
BLAKE2b-256 checksum
How to use checksums
ab1abfa4424027bd80f3966d20c46f09b3663be7d90b180249686a2f27e0c2da
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.0

Release history Release notifications | RSS feed

This release

1.0.4 This release

2 release files

1.0.3

2 release files

1.0.2

2 release files

1.0.1

2 release files

1.0.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page