Skip to main content

Autonomous

⚠️ ⚠️ ⚠️ WiP ⚠️ ⚠️ ⚠️

Tests

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
  • Task queue
  • Auth
  • 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 in docs/conf.py.
    • Build: make docs, then open docs/_build/html/index.html. Live- reload during edits: make docs-serve.
    • The legacy zero-dependency generator is archived at scripts/_archive/gen_docs.py for reference.

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

  1. Update version in /src/autonomous/__init__.py
  2. make package

Metadata

Release files for autonomous-app 0.3.183

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

Source distribution (sdist)

Source distribution for autonomous-app 0.3.183
File Size Uploaded Provenance Actions
autonomous_app-0.3.183.tar.gz 253.4 kB Without provenance Details for autonomous_app-0.3.183.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for autonomous-app 0.3.183
File Interpreter ABI Platform Actions
autonomous_app-0.3.183-py3-none-any.whl Python 3 none any Details for autonomous_app-0.3.183-py3-none-any.whl

Total release size: 534.0 kB

Release files / autonomous_app-0.3.183.tar.gz

Download URL autonomous_app-0.3.183.tar.gz
Size 253.4 kB
Tags Source
SHA-256 checksum
How to use checksums
64bedd21faf7ba18e30a69ac5f09b01d3ceee110604ba0e53ea4f0aa8ddef69f
BLAKE2b-256 checksum
How to use checksums
b4fb51dfeefd0857fb6b180ce1227bbbf2d0d9680548a4f2c50c968e7768cfa2
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.183-py3-none-any.whl

Download URL autonomous_app-0.3.183-py3-none-any.whl
Size 280.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
0d0f139edff71e899c7f90a00e013f349c90dff03b5ee5bb6675de0cf09eef2e
BLAKE2b-256 checksum
How to use checksums
e333bebbd005d0b8e631e64524d8993cf77c0752628c17ff29cf66074abe6c16
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.183

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.

Release history Release notifications | RSS feed

This release

0.3.183 This release

2 release files No provenance

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