Skip to main content

Cloudoll

English | 简体中文

Cloudoll 4.0.0 is an aiohttp-based Python library for routing, middleware, templates, sessions, JWT, database access and application scaffolding.

Install

Python 3.9+ is required. Install only the optional drivers you use:

python -m pip install 'cloudoll==4.0.0'
python -m pip install 'cloudoll[mysql,postgres,cache]==4.0.0'

The AWS extra requires Python 3.10+. Aurora remains untested; see Aurora limitations.

Quick start

cloudoll create myapp
cd myapp
python -m pip install -r requirements.txt
cloudoll start -n myapp

The generated project targets 4.0.0 and receives a random JWT secret. Controllers and authentication middleware are examples: replace demo credentials and supply your own authorization and upload policies before deployment.

A minimal application without a configuration file:

from cloudoll.web import Application

application = Application()

@application.get('/')
async def home(request):
    return {'hello': 'cloudoll'}

if __name__ == '__main__':
    application.create(env=None, entry_model=None).run()

By default, create() loads config/conf.local.yaml. An explicitly selected missing file is an error. Use env=None or config={} only for intentional no-config mode. Template rendering uses Jinja2, via render_view().

Production and diagnostics

cloudoll start -n myapp -env prod -m production

Production mode stays in the foreground. Use a process manager for automatic restarts; do not mix its stop/restart commands with Cloudoll's manual management. Coordinate request draining, resource cleanup and process termination deadlines.

from cloudoll.logging import configure_logging
configure_logging(format='json', files=False)

JSON logging supports structured secret-key masking and a custom string redactor. Native MySQL/PostgreSQL support opt-in echo=True and echo_params=True; both default to false. SQL is logged at INFO and parameter output requires both switches. SQL text itself can contain secrets; avoid enabling this in production.

Application(observer=...) and observation_scope(...) expose value-free HTTP/query events. Native engines expose pool_stats(). trace_context() correlates log IDs; it is not a tracing SDK. See production contracts.

Upgrading from 3.0.14

  • Replace executable configuration expressions with literal values. Missing environment variables/files and invalid core configuration fail explicitly.
  • Use private Session/JWT keys. Discard cookies created with old publicly derivable keys; share the Session key across workers.
  • JWT validation requires exp by default and supports issuer, audience, leeway and required claims. Invalid credentials return None; configuration errors raise. Explicit require=() permits legacy tokens without an expiry.
  • Model.use(db) returns an independent Query. Records track UNSET and dirty fields; database errors propagate instead of appearing as empty results.
  • Native transactions/savepoints are task-owned. Streams need an async with scope. Writes and uncertain COMMIT operations are never automatically retried.
  • PostgreSQL ORM inserts use RETURNING. Raw inserts without RETURNING and batch inserts do not manufacture a primary key.
  • Each Application can be created once. Discovery uses an isolated namespace; use package-relative imports for local controller helpers.
  • Native pool closure defaults to 10 seconds; application resource closure uses a 10-second per-resource limit and a 30-second total budget. These deadlines cannot be disabled with None and do not bound arbitrary user cleanup code.
  • Development children/reloads create independent applications at the explicit project root, including under fork. CLI verifies process identity before stop.
  • HTTP Session.max_retries counts total attempts. POST/PATCH and non-replayable bodies are not automatically replayed by default.

See changelog, migration details, streaming and typing and schema generation. The schema generator is not a production database migration tool.

Development and release checks

python -m pip install -e '.[mysql,postgres,cache,dev]'
python -m ruff check cloudoll tests
python -m mypy
python -m pytest -q -m 'not integration' -k 'not aws'
python -m build
python tests/check_wheel.py dist/cloudoll-4.0.0-py3-none-any.whl
python tests/check_release.py dist/cloudoll-4.0.0-py3-none-any.whl

Native integration tests require explicitly configured disposable databases. See architecture and verification. AWS tests are excluded from ordinary CI. Passing CI is not a substitute for workload-specific testing.

Documentation and maintenance

Metadata

Release files for cloudoll 4.0.0

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

Source distribution (sdist)

Source distribution for cloudoll 4.0.0
File Size Uploaded
cloudoll-4.0.0.tar.gz 165.6 kB Details

Built distribution (wheel)

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

Total release size: 277.4 kB

Release files / cloudoll-4.0.0.tar.gz

Download URL cloudoll-4.0.0.tar.gz
Size 165.6 kB
Tags Source
SHA-256 checksum
How to use checksums
68b4da189105f7c4ad55c1d57249e0f0c18e3ce3c62b946386ebd31e6ed8f786
BLAKE2b-256 checksum
How to use checksums
cbc5dea1548e38919f42ee38662e38593ab4d98bf0fb26ea940188de30007058
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.1

Release files / cloudoll-4.0.0-py3-none-any.whl

Download URL cloudoll-4.0.0-py3-none-any.whl
Size 111.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
ed2b21866ac146868765ce597b59c017cf0022b0e74c88c0d1f6dc080e4b3c07
BLAKE2b-256 checksum
How to use checksums
5ac3bfe1b6d66b2d8c0ce630c1e18b516004b87fdfc3671eeab906ce55406a8e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.1

Release history Release notifications | RSS feed

4.3.0

2 release files

4.2.1

2 release files

4.1.0

2 release files

This release

4.0.0 This release

2 release files

3.0.14

2 release files

3.0.13

2 release files

3.0.12

2 release files

3.0.11

2 release files

3.0.10

2 release files

3.0.9

2 release files

3.0.8

2 release files

3.0.7

2 release files

3.0.6

2 release files

3.0.5

2 release files

3.0.4

2 release files

3.0.3

2 release files

3.0.2

2 release files

3.0.1

2 release files

3.0.0

2 release files

2.4.0

3 release files

2.3.2

2 release files

2.3.1

2 release files

2.3.0

2 release files

2.2.38

2 release files

2.2.37

2 release files

2.2.36

2 release files

2.2.31

2 release files

2.2.30

2 release files

2.2.29

2 release files

2.2.28

2 release files

2.2.26

2 release files

2.2.24

2 release files

2.2.23

2 release files

2.2.20

2 release files

2.2.19

2 release files

2.2.18

2 release files

2.2.17

2 release files

2.2.14

2 release files

2.2.13

2 release files

2.2.12

2 release files

2.2.11

2 release files

2.2.10

2 release files

2.2.9

2 release files

2.2.8

2 release files

2.2.7

2 release files

2.2.6

2 release files

2.2.5

2 release files

2.2.4

2 release files

2.2.3

2 release files

2.2.2

2 release files

2.2.1

2 release files

2.2.0

2 release files

2.1.0

2 release files

2.0.23

2 release files

2.0.22

2 release files

2.0.21

2 release files

2.0.20

2 release files

2.0.19

2 release files

2.0.18

2 release files

2.0.17

2 release files

2.0.16

2 release files

2.0.15

2 release files

2.0.14

2 release files

2.0.13

2 release files

2.0.12

2 release files

2.0.11

2 release files

2.0.10

2 release files

2.0.9

2 release files

2.0.8

2 release files

2.0.7

2 release files

2.0.6

2 release files

2.0.5

2 release files

2.0.4

2 release files

2.0.3

2 release files

2.0.2

2 release files

2.0.1

2 release files

2.0.0

2 release files

0.1.6

2 release files

0.1.5

2 release files

0.1.4

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release files

0.0.10

2 release files

0.0.9

2 release files

0.0.8

2 release files

0.0.7

2 release files

0.0.6

2 release files

0.0.5

2 release files

0.0.4

2 release files

0.0.3

2 release files

0.0.2

2 release files

0.0.1

2 release files

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