Skip to main content

Fully asynchronous Python library for carbon.now.sh

Project description

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

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.4.tar.gz (5.3 kB view details)

Uploaded Source

Built Distribution

py_carbon-1.0.4-py3-none-any.whl (8.5 kB view details)

Uploaded Python 3

File details

Details for the file py-carbon-1.0.4.tar.gz.

File metadata

  • Download URL: py-carbon-1.0.4.tar.gz
  • Upload date:
  • Size: 5.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.0

File hashes

Hashes for py-carbon-1.0.4.tar.gz
Algorithm Hash digest
SHA256 b8aa7da66ec9ab3cbc36cd03b58b6ce23bfa8b565756040124158c7757712627
MD5 e3bcd35c690ea68f938ce930ef94fa66
BLAKE2b-256 a0e08fd85b41ab6deef48f774fea9193a9116c5a41294ad93a20d173769ab4a6

See more details on using hashes here.

File details

Details for the file py_carbon-1.0.4-py3-none-any.whl.

File metadata

  • Download URL: py_carbon-1.0.4-py3-none-any.whl
  • Upload date:
  • Size: 8.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.0

File hashes

Hashes for py_carbon-1.0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 fa7a1398e3abc7ca8ca58fe091d19edbf55ebeea765c57ccfe1a4eadeffe2508
MD5 54a911455387ba085fe17fdeb1a771e0
BLAKE2b-256 ab1abfa4424027bd80f3966d20c46f09b3663be7d90b180249686a2f27e0c2da

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page