Skip to main content

carbonsh

Tests PyPI - Wheel PyPI PyPI - Python Version

Python module for carbon.now.sh

Install

pip install carbonsh

** pyppeteer requires to download Chromium the first time you use it, go to its documentation for more information

Usage

import carbonsh
import asyncio
code = ("const test = 'test';"
        "let x = 0.1 + 0.2;"
        "console.log(test, x)")

config = carbonsh.Config(language=carbonsh.languages.JAVASCRIPT)

# returns >>> 'https://carbon.now.sh/?bg=rgba(...'
carbon_url = carbonsh.code_to_url(code, config)

loop = asyncio.get_event_loop()

# saves the image as carbon.png where expected
loop.run_until_complete(carbonsh.url_to_file(carbon_url, '/path/to/save/screenshot/'))

loop.run_until_complete(carbonsh.code_to_file(code,config,'/path/to/save/screenshot/'))

Metadata

Release files for carbonsh 0.2.0

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

Source distribution (sdist)

Source distribution for carbonsh 0.2.0
File Size Uploaded Provenance Actions
carbonsh-0.2.0.tar.gz 19.8 kB Without provenance Details for carbonsh-0.2.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for carbonsh 0.2.0
File Interpreter ABI Platform Actions
carbonsh-0.2.0-py3-none-any.whl Python 3 none any Details for carbonsh-0.2.0-py3-none-any.whl

Total release size: 40.9 kB

Release files / carbonsh-0.2.0.tar.gz

Download URL carbonsh-0.2.0.tar.gz
Size 19.8 kB
Tags Source
SHA-256 checksum
How to use checksums
e5a1c8a9f86b255bd28ccbcd6909e1622ec6b973878ca56f34e083934fd16c33
BLAKE2b-256 checksum
How to use checksums
905bec98f6c102b13ab9d70b88c2dc2c4413cf182f9aa5769fd2722709ad4d81
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.7

Release files / carbonsh-0.2.0-py3-none-any.whl

Download URL carbonsh-0.2.0-py3-none-any.whl
Size 21.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
262f8074b5e015f400755f5b60d62659b7ec250f2948cb04c3db6dd30e0af801
BLAKE2b-256 checksum
How to use checksums
30460e92c653b9cba3cba6d8e77e4385ab8af0ce2c484e18f8e96dd786b58b48
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.7

Security for carbonsh 0.2.0

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.

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