Skip to main content

novence (Python)

Python SDK for Novence — static site hosting built for AI agents.

Prefer the CLI for a first publish — no email until you claim:

npx novence deploy ./dist
novence claim --email you@example.com

This SDK is for app and script code after you have an nv_ key.

pip install novence

Requires Python 3.10+. No third-party dependencies — standard library only.

Quick start

import os
from novence import Novence

client = Novence(api_key=os.environ["NOVENCE_API_KEY"])
project = client.create_project("launch")
pid = project["project"]["id"]

client.upload_bytes(pid, "index.html", "text/html; charset=utf-8", b"<h1>hi</h1>")
client.deploy(pid)

deployment = client.wait_for_deployment(pid)     # polls until live or failed
print(deployment["liveUrl"])

One HTML document: client.publish_html(html, title="Report") then wait_for_deployment. CLI: npx novence deploy report.html.

Bootstrap + verify (email path)

When you need a key from email OTP instead of the CLI:

from novence import Novence, bootstrap_account, verify_email

boot = bootstrap_account("you@example.com")     # emails a 6-digit OTP
verify_email("you@example.com", "123456")

client = Novence(api_key=boot["apiKey"])
project = client.create_project("launch")
pid = project["project"]["id"]

client.upload_bytes(pid, "index.html", "text/html; charset=utf-8", b"<h1>hi</h1>")
client.deploy(pid)

deployment = client.wait_for_deployment(pid)     # polls until live or failed
print(deployment["liveUrl"])

Or deploy anonymously from the SDK, then claim: create_demo_account() → ship → claim_account(api_key, "you@example.com").

Configuration

base_url defaults to https://api.novence.ai. Override per client, or set NOVENCE_BASE_URL to point everything at a different control plane:

client = Novence(api_key=key, base_url="http://127.0.0.1:8080")

The variable is read at call time, so setting it after import still works.

Deploys are asynchronous

deploy() returns as soon as the deployment is queued. Use wait_for_deployment(project_id, timeout=300, interval=2) to block until it is live, or poll latest_deployment(project_id) yourself.

checks_results["passed"] is None when checks were skipped (unverified accounts). That is not a pass.

API

Area Methods
Projects create_project list_projects get_project update_project project_usage project_analytics get_site_brief put_site_brief list_site_events
Uploads upload_dir upload_file upload_bytes get_upload_url get_upload_urls_batch confirm_upload confirm_batch
Deploys deploy latest_deployment wait_for_deployment
Domains configure_domain domain_status
Forms create_form list_forms get_form update_form delete_form list_form_submissions delete_form_submission
Billing quotas checkout billing_portal mpp_upgrade
Account get_account account_console_kit create_session revoke_session revoke_api_key

Module-level: create_demo_account claim_account bootstrap_account verify_email resend_verification reissue_api_key.

reissue_api_key issues a new key and revokes the old one — rebuild your client with the returned key.

Uploading a directory

result = client.upload_dir(pid, "./dist")
result["uploaded"]   # site paths that went up
result["skipped"]    # local files whose extension the platform does not accept

Dotfiles and dot-directories (.git, .env) are skipped, matching the TypeScript SDK.

Errors

Every API error raises RuntimeError carrying the API's message — including rate limits and quota rejections.

Security

nv_ keys are server-side credentials. Read them from the environment; never commit one or put one in client-side code.

License

MIT

Metadata

Release files for novence 0.2.2

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

Source distribution (sdist)

Source distribution for novence 0.2.2
File Size Uploaded Provenance
novence-0.2.2.tar.gz 11.6 kB Without provenance Details

Built distribution (wheel)

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

Total release size: 22.0 kB

Release files / novence-0.2.2.tar.gz

Download URL novence-0.2.2.tar.gz
Size 11.6 kB
Tags Source
SHA-256 checksum
How to use checksums
feb9f9a0a10bf639295b063ce31a6f1f3ef9dc944102d35076f3e70d3623c91b
BLAKE2b-256 checksum
How to use checksums
635b50513a2a6a9df33e8760c9f825c3d524455c1a6af7a975d125b9d457af8e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.5

Release files / novence-0.2.2-py3-none-any.whl

Download URL novence-0.2.2-py3-none-any.whl
Size 10.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
65bc7de3bc17b745e8f5a89a2bd991fab2c97936bb38b5f74b1d94d56af64f0a
BLAKE2b-256 checksum
How to use checksums
dd8c7a859b7b2b5e56fe74f1751fde15b13c1e326a8f08c36e1ddc089f2cc19d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.5

Security for novence 0.2.2

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