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" instead

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.1.tar.gz (41.9 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.1-py3-none-any.whl (18.7 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: carbon_txt_validator-0.0.1.tar.gz
  • Upload date:
  • Size: 41.9 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.1.tar.gz
Algorithm Hash digest
SHA256 dd72dfefb228b2de9863c6f56d5555c4918b6cbc6b25f4f704970e1730850a44
MD5 177a07a1a3e68caacf8c1daf6e3c9298
BLAKE2b-256 6bec965e4665773508e2a90b7d05d347a1a7e842199887e5257d4205fb2104e9

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for carbon_txt_validator-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 e7b4c9e93321d884f395875a1e9e4e814da74a9df631a0f8c54e4a9fc00f2b86
MD5 b5030ef3eaa3f2e0a9973f4673fc75c8
BLAKE2b-256 335b04c2130ff03ad4a512587ac53155408b904ffae1f9f9b2f8925d4ebf1a60

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