aiocarbon
Client for feeding data to graphite. The package requires Python 3.11 or newer, and has no runtime dependencies.
Installation
pip install aiocarbon
Example
Counter example:
import asyncio
import aiocarbon
async def main():
client = aiocarbon.setup(
host="127.0.0.1", port=2003, client_class=aiocarbon.TCPClient
)
# Send the collected metrics every second.
sender = asyncio.create_task(client.run())
for _ in range(1000):
with aiocarbon.Counter("foo"):
await asyncio.sleep(0.1)
# Send the rest of the metrics before the exit.
await client.send()
sender.cancel()
if __name__ == "__main__":
asyncio.run(main())
Clients
aiocarbon.TCPClient sends metrics in the plaintext protocol over TCP.
aiocarbon.UDPClient sends metrics in the plaintext protocol over UDP.
aiocarbon.PickleClient sends metrics in the pickle protocol, port 2004.
Each client aggregates the metrics in a storage. TotalStorage is the default one, and it adds up the values of one metric in one second. RawStorage keeps every sample.
Development
The project uses uv for the environment, and ruff, mypy and pytest for the checks:
uv sync
uv run ruff check .
uv run mypy
uv run pytest
Metadata
Release files for aiocarbon 0.17.0
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 | |
|---|---|---|---|---|
| aiocarbon-0.17.0.tar.gz | 72.3 kB | With provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| aiocarbon-0.17.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 89.6 kB
Release files / aiocarbon-0.17.0.tar.gz
| Download URL | aiocarbon-0.17.0.tar.gz |
|---|---|
| Size | 72.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
f2e832f87d63a767c06bdcfae93b32421736ce106be2cece58ce62112ab20709
|
|
BLAKE2b-256 checksum How to use checksums |
6bc7d58ae48a337539b5c781f4b7c75dfca04cd92628123d11f012367551c5c9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 24, 2026.
Transparency logRelease files / aiocarbon-0.17.0-py3-none-any.whl
| Download URL | aiocarbon-0.17.0-py3-none-any.whl |
|---|---|
| Size | 17.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
4271f6b129b6cbdead7e5754b16e14f131b5354534161c0749175672ec3ae785
|
|
BLAKE2b-256 checksum How to use checksums |
c569b04523c0590ea17142ee2360ada07f8312d0f63b7eac51c61849b207f8be
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 24, 2026.
Transparency logSecurity for aiocarbon 0.17.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.
Full provenance
All 2 files in this release have been uploaded with provenance metadata.
Attestation for aiocarbon-0.17.0.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 24, 2026.
Transparency logA 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.