A Python library for deploying static assets to Cloudflare Pages.
uv add schlepperimport schlepper
result = schlepper.deploy(
"./dist",
project_name="my-site",
account_id="your-account-id",
credentials=schlepper.ApiToken(token="your-api-token"),
branch="production",
commit_message="Deploy v1.0.0",
)
print(f"Deployed to {result.url} (status: {result.status})")ApiKey credentials are also supported:
credentials = schlepper.ApiKey(key="your-global-api-key", email="you@example.com")Linting/formatting/type checking:
uv run ruff check
uv run ruff format --check
uv run ty checkUnit testing:
uv run pytest
# with coverage
uv run coverage run -m pytestIntegration tests (requires Cloudflare credentials):
# see it.env.example
export $(cat it.env | xargs)
uv run pytest -m integrationBuild docs:
uv run sphinx-build -b html docs docs/_build/htmlschlepper is licensed under either of
- Apache License, Version 2.0, (LICENSE-APACHE or https://www.apache.org/licenses/LICENSE-2.0)
- MIT license (LICENSE-MIT or https://opensource.org/licenses/MIT)
at your option.
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in schlepper by you, as defined in the Apache-2.0 license, shall be dually licensed as above, without any additional terms or conditions.