Autonomous
⚠️ ⚠️ ⚠️ WiP ⚠️ ⚠️ ⚠️
Autonomous is an ORM + utility framework layer you lay over whatever micro-framework you choose (Flask, FastAPI, Starlette, pure WSGI, an async worker, a CLI) to stop rewriting the same containerized-service plumbing on every project.
It is not a web framework. It ships a MongoDB-backed ORM, a Redis-backed task runner, pluggable file storage, OAuth2 auth, AI-model adapters, and a tiny WSGI-compatible response/session layer so the auth pieces drop into any host framework without a hard dependency on it.
What you get
| Area | Module | What it does |
|---|---|---|
| ORM | autonomous.model.automodel |
AutoModel — a MongoDB-backed document with typed attributes (StringAttr, IntAttr, DateTimeAttr, ListAttr, ReferenceAttr). Handles save/get/random/delete, inheritance, circular & dangling references. |
| Auth | autonomous.auth |
AutoAuth base + GoogleAuth / GithubAuth OAuth2 flows built on Authlib; AutoUser model with authenticated / guest / admin roles; @auth_required decorator for host views. |
| Web shim | autonomous.web |
WSGI-compatible Response + redirect(), a pluggable SessionStore protocol, a ContextSession default, and a stdlib-only SignedCookieSession. The auth decorator talks to these, not to any framework's globals. |
| Tasks | autonomous.taskrunner.autotasks |
AutoTasks wraps RQ + Redis with priority queues, timeouts, current-job helpers. |
| Storage | autonomous.storage |
LocalStorage + ImageStorage (thumbnails / resized variants) for filesystem-backed asset storage with URL resolution. |
| AI | autonomous.ai.models.local_model, gemini |
Adapters for Ollama (local LLM), a media service for image/audio generation, and Google Gemini. All endpoints are HTTP so tests mock requests.post. |
| Logging | autonomous.logger |
Leveled, toggleable logger reachable as from autonomous import log. |
How it's meant to be used
Bring your own web micro-framework. Mount Autonomous components in your views, tasks, and CLI scripts. The library stays framework-agnostic.
Flask
from flask import Flask, session as flask_session, url_for
from autonomous.auth import AutoAuth
from autonomous.auth.google import GoogleAuth
from autonomous.web import bind_session
app = Flask(__name__)
AutoAuth.login_url = "/auth/login" # or url_for("auth.login") inside a request
@app.before_request
def _bind():
# flask_session is already a dict-like; Autonomous will read/write it
bind_session(flask_session)
@app.route("/me")
@AutoAuth.auth_required()
def me():
return AutoAuth.current_user().to_json()
FastAPI / Starlette / pure WSGI
from autonomous.web import ContextSession, bind_session, redirect
def middleware(environ, start_response):
bind_session(ContextSession()) # per-request dict session
# ... dispatch to the view; if it returns a Response it's WSGI-callable:
response = view(environ)
return response(environ, start_response)
Task runner
from autonomous.taskrunner.autotasks import AutoTasks, TaskPriority
def send_email(to, body): ...
AutoTasks().task(send_email, "a@b.c", "hi", priority=TaskPriority.HIGH)
ORM
from autonomous.model.automodel import AutoModel
from autonomous.model.autoattr import StringAttr, IntAttr
class Post(AutoModel):
title = StringAttr(default="")
views = IntAttr()
p = Post(title="hello"); p.save()
Post.get(p.pk).title # "hello"
Dependencies
- Languages
- Containers
- Server
- Database
- pymongo (MongoDB driver)
- Task queue
- Auth
- Authlib (OAuth2 / OIDC)
- Networking
- AI
- Testing
- Documentation
- Hand-authored guides live under
docs/(Markdown via myst-parser). - Sphinx + autodoc + furo render a navigable HTML reference to
docs/_build/html/; the configuration is indocs/conf.py. - Build:
make docs, then opendocs/_build/html/index.html. Live- reload during edits:make docs-serve. - The legacy zero-dependency generator is archived at
scripts/_archive/gen_docs.pyfor reference.
- Hand-authored guides live under
Autonomous has no framework dependency — pick your own (Flask, FastAPI, pure WSGI, CLI) and plug Autonomous into it.
Developer Notes
TODO
- Setup/fix template app generator
- Switch to less verbose html preprocessor
- 100% testing coverage
Issue Tracking
- None
Processes
Generate app
TBD
Tests
make tests
Package
- Update version in
/src/autonomous/__init__.py make package
Metadata
Release files for autonomous-app 0.3.184
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| autonomous_app-0.3.184.tar.gz | 253.5 kB | Without provenance | Details for autonomous_app-0.3.184.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| autonomous_app-0.3.184-py3-none-any.whl | Python 3 | none | any | Details for autonomous_app-0.3.184-py3-none-any.whl |
Total release size: 534.1 kB
Release files / autonomous_app-0.3.184.tar.gz
| Download URL | autonomous_app-0.3.184.tar.gz |
|---|---|
| Size | 253.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
5c2aa8b357dcf6789893866053bc97c0b7ee3273ab1197510d0c28b4d96a8bf7
|
|
BLAKE2b-256 checksum How to use checksums |
81b92c008ea1f27fd518af652476387a6e9eb051fe8b754fb3b039084122b2ad
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.13
|
Release files / autonomous_app-0.3.184-py3-none-any.whl
| Download URL | autonomous_app-0.3.184-py3-none-any.whl |
|---|---|
| Size | 280.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
d14fecd178c2d29a60594123764ba536b1f6ea88b34986d20a6aeb4b2719ea18
|
|
BLAKE2b-256 checksum How to use checksums |
38647f8fbf7f1aeb951a09d992bbde6b45710794c87726f932dbdab2e1ba2fc7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.13
|
Security for autonomous-app 0.3.184
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.