Skip to main content

theca-sdk-python

Run your own private CA at devnull.cn: every account gets its own self-signed root CA (no shared devnull root, no cross-account trust), and this package writes the PEM files to ~/.devnull/certs/.

Requires theid>=2 (theid 2.0 credentials; the service only accepts EdDSA access tokens).

Usage

# Credentials come from ~/.devnull/credentials (shared with devnull-cli) or env
export THEID_ACCESS_KEY=DK...
export THEID_SECRET_KEY=...

python3 - <<'EOF'
from theca import create_cert
print(create_cert())
EOF

ls -lt ~/.devnull/certs/
# key.pem  crt.pem  fullchain.pem  ca.pem  system_id  subject_alternative_names  properties

create_cert() creates the account's root CA on first use, then issues a certificate for the host's system_id plus its private/public thedns names, and writes the chain next to it. The returned ca_url (https://devnull.cn/getca/<account_id>) downloads the CA certificate.

Point at another environment with DEVNULL_PCA_URL (default https://devnull.cn/pca; the 3.0.1 name DEVNULL_THECA_URL is still read). The identity service is resolved by theid (DEVNULL_BASE_URL / THEID_ISSUER).

Revocation

from theca import revoke_cert, crl

revoke_cert('api.example.com')     # idempotent; it stays in the CRL
open('ca.crl.pem', 'w').write(crl())

New certificates carry a CRL distribution point (https://devnull.cn/pca/crl/<account_id>); verify with openssl verify -crl_check -CRLfile ca.crl.pem -CAfile ca.pem crt.pem.

What the service stores

Per account: one RSA-4096 root CA (10 years) and up to 11 RSA-2048 certificates (1 year, SANs from the requested names). All material is stored in Postgres as base64 PEM; create_cert() is idempotent per common name.

Metadata

Release files for theca 3.0.5

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

Source distribution (sdist)

Source distribution for theca 3.0.5
File Size Uploaded Provenance
theca-3.0.5.tar.gz 16.4 kB Without provenance Details

Built distribution (wheel)

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

Total release size: 33.3 kB

Release files / theca-3.0.5.tar.gz

Download URL theca-3.0.5.tar.gz
Size 16.4 kB
Tags Source
SHA-256 checksum
How to use checksums
8ad3f865e274bcb6fec0a6a18a4222b86d0161fb8ba01f46031815e220d23279
BLAKE2b-256 checksum
How to use checksums
a342b147b3879ad2dbb660a9577b7b38bf17a532ac04b46803c84889cd6e8398
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.5

Release files / theca-3.0.5-py3-none-any.whl

Download URL theca-3.0.5-py3-none-any.whl
Size 16.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
92b5096bb44e37e884b8ccd38481663d19de054efacef9636930b074f5b3673c
BLAKE2b-256 checksum
How to use checksums
afe953f1e4b93fb44edef9ae62f2c8d8c122b52c75eeee523ea38b4a431c909f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.5

Security for theca 3.0.5

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