Skip to main content

A validator for carbon.txt files, by the Green Web Foundation

Reason this release was yanked:

this project is available at "carbon-txt"

Project description

Carbon.txt validator

This validator reads carbon.txt files, and validates them against a spec defined on http://carbontxt.org.

Usage

With the CLI

Run a validation against a given domain, or file, say if the file is valid TOML, and it confirms to the carbon.txt spec.

The following commands assume you are working in a virtual environment:

# parse the carbon.txt file on default paths on some-domain.com
carbon-txt validate domain some-domain.com

# parse a remote file available at https://somedomain.com/path-to-carbon.txt
carbon-txt validate file https://somedomain.com/path-to-carbon.txt

# parse a local file ./path-to-file.com
carbon-txt validate file ./path-to-file.com

# pipe the contents of a file into the file validation command as part of a pipeline
cat ./path-to-file.com | carbontxt validate file

Using UV

If you are not using a virtual environments, but running uv, in a project you can run it with uv run carbon-txt your args

With the HTTP API

You can also validate carbon.txt files sent over an HTTP API.

# run the carbon-txt validator as a server using the default django server. Not for production
carbon-txt serve

For production, Granian, a performant webserver is bundled. Pass the flag --server granian to use it.

# run the carbon-txt validator as a server using the production granian server
carbon-txt serve --server granian

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

carbon_txt_validator-0.0.2.tar.gz (42.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

carbon_txt_validator-0.0.2-py3-none-any.whl (18.7 kB view details)

Uploaded Python 3

File details

Details for the file carbon_txt_validator-0.0.2.tar.gz.

File metadata

  • Download URL: carbon_txt_validator-0.0.2.tar.gz
  • Upload date:
  • Size: 42.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.13.0rc2

File hashes

Hashes for carbon_txt_validator-0.0.2.tar.gz
Algorithm Hash digest
SHA256 32388e4192a355323ac9dde1e46abd40f907390d761540f299cb586a98d3f8db
MD5 0491ef0cd0b2079094033f109b488009
BLAKE2b-256 bf6a8b73f2816532a0f83d85e34f25ede9b991558463fc1909ba209638080562

See more details on using hashes here.

File details

Details for the file carbon_txt_validator-0.0.2-py3-none-any.whl.

File metadata

File hashes

Hashes for carbon_txt_validator-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 71e567a944c8379ec52c6ae0f51e2c66fb199e07bfb29a7cc394cbeb8f874e45
MD5 fe4ceea5a09db34fcf42f20a783bd187
BLAKE2b-256 759c9ee76122a4f88018197664feca8974f675f12e08422a69eb624ef2ffef01

See more details on using hashes here.

Supported by

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