pyactiveresource
ActiveResource for Python
What it is and what it does
PyActiveResource is a Python port of Rails' ActiveResource library, providing an object-relational mapping layer for REST web services. Instead of writing HTTP requests manually, you define model classes that inherit from ActiveResource, set a REST endpoint URL, and then use familiar ORM-style methods (find, create, save, delete) to interact with remote resources. The library handles JSON serialization, HTTP verb routing (GET for retrieval, POST for creation, PUT for updates, DELETE for removal), and automatic object construction from JSON responses.
The package is designed to reduce boilerplate when working with RESTful APIs that follow standard conventions. It converts JSON responses into Python objects with attributes matching the JSON keys, handles nested objects automatically, and supports query parameters and custom headers for authentication. However, the codebase is mature but aging—last released in 2021 with classifiers targeting Python 2.6–3.4—so it may require verification or updates to work smoothly on modern Python versions.
Use it for:
- Building a Python client for a REST API where resources map cleanly to object models.
- Rapid prototyping of integrations with remote REST services without writing raw HTTP code.
- Migrating from Rails ActiveResource to Python while maintaining similar ORM-style patterns.
- Simplifying CRUD operations against a remote REST endpoint with automatic JSON marshalling.
- Creating a Python wrapper around a convention-based REST API with minimal boilerplate.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
PyActiveResource maps Python classes to remote REST resources, allowing you to interact with RESTful web services using object-oriented syntax similar to database ORM patterns.
Yes, with conditions. PyActiveResource is a mature, permissively licensed library for REST ORM use cases, and it has active GitHub maintenance. However, install friction is high due to the source distribution and outdated Python version classifiers. Before installing, verify that it works on your target Python version and that your REST API follows the conventions the library expects. If your API is non-standard, consider alternatives.
Install
pyactiveresource on PyPI
pip
pip install pyactiveresourceuv
uv add pyactiveresourcepoetry
poetry add pyactiveresourceInstalling pyactiveresource
Before you install
Installation friction is high: the package has no runtime dependencies but relies on a source distribution (tar.gz), and the codebase targets Python 2.6–3.4 classifiers while the last release was in 2021. Maintenance is active on GitHub, though the gap between last release and current date suggests limited recent updates.
License in practice
MIT License (permissive) means you can use, modify, and distribute this package freely in commercial and private projects, with minimal restrictions beyond attribution.
Quickstart
pip install pyactiveresource
from pyactiveresource import activeresource as ar
class Person(ar.ActiveResource):
_site = 'http://api.example.com:3000/people'
person = Person.find(1)
print(person.first)
The package targets Python 2.6–3.4; compatibility with modern Python versions is not documented and may require testing or updates.
Verify before relying
- Whether the package works reliably with Python versions beyond 3.4 despite classifier limits.
- Current state of dependency compatibility and whether the source distribution installs cleanly on modern systems.
- Whether authentication mechanisms beyond custom headers are supported.
Package facts
| License | MIT License (permissive) |
| Python support | not specified |
| Install friction | high — source build required |
| Runtime dependencies | none |
| Maintenance | actively maintained — 2,017 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 813,595/month — #4,996 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: pyactiveresource-2.2.2.tar.gz
Tags
More Software Development packages
Provides backported and experimental type hints…
permissive · top 100 on PyPI
numpyNumPy provides an N-dimensional array object…
permissive · top 100 on PyPI
fastapiFastAPI is a Python web framework for building…
permissive · top 100 on PyPI
annotated-docProvides a way to document function parameters,…
permissive · top 100 on PyPI
typerTyper builds command-line applications from…
permissive · top 1,000 on PyPI
distlibDistlib provides low-level packaging utilities…
permissive · top 1,000 on PyPI
kumo-apikumo-api defines RESTful API resource schemas…
permissive · top 15,000 on PyPI
redfishA Python library for interacting with…
permissive · top 15,000 on PyPI
wadllibParses and navigates HTTP web services…
copyleft · top 15,000 on PyPI
rwslibrwslib provides a Python client library for…
permissive · top 15,000 on PyPI
YORMYORM maps Python object attributes…
permissive · top 15,000 on PyPI
restflyRESTfly is a framework for building libraries…
permissive · top 15,000 on PyPI
sqlalchemy-mixinsProvides Active Record-style mixins for…
permissive · top 15,000 on PyPI
tortoise-ormTortoise ORM is an async-native…
permissive · top 15,000 on PyPI
webapp2A lightweight Python web framework designed for…
permissive · top 15,000 on PyPI
ponyPony is an object-relational mapper that lets…
permissive · top 15,000 on PyPI