Skip to main content

Downloads

Downloads Downloads Downloads

Pony Object-Relational Mapper

This is the poney distribution — a fork of Pony ORM. It is installed as pip install poney, while the import name stays pony:

python -m pip install poney

Pony is an advanced object-relational mapper. The most interesting feature of Pony is its ability to write queries to the database using Python generator expressions and lambdas. Pony analyzes the abstract syntax tree of the expression and translates it into a SQL query.

Here is an example query in Pony:

select(p for p in Product if p.name.startswith('A') and p.cost <= 1000)

Pony translates queries to SQL using a specific database dialect. Currently Pony works with SQLite, MySQL, PostgreSQL and Oracle databases.

By providing a Pythonic API, Pony facilitates fast app development. Pony is an easy-to-learn and easy-to-use library. It makes your work more productive and helps to save resources. Pony achieves this ease of use through the following:

  • Compact entity definitions
  • The concise query language
  • Ability to work with Pony interactively in a Python interpreter
  • Comprehensive error messages, showing the exact part where an error occurred in the query
  • Displaying of the generated SQL in a readable format with indentation

All this helps the developer to focus on implementing the business logic of an application, instead of struggling with a mapper trying to understand how to get the data from the database.

See the example here

Support Pony ORM Development

Pony ORM is Apache 2.0 licensed open source project. If you would like to support Pony ORM development, please consider:

Become a backer or sponsor

Online tool for database design

Pony ORM also has the Entity-Relationship Diagram Editor which is a great tool for prototyping. You can create your database diagram online at https://editor.ponyorm.com, generate the database schema based on the diagram and start working with the database using declarative queries in seconds.

Documentation

Documentation is available at https://docs.ponyorm.org The documentation source is available at https://github.com/ponyorm/pony-doc. Please create new documentation related issues here or make a pull request with your improvements.

Development

Install the development tools:

python -m pip install -r requirements-dev.txt

Format the Python code and apply safe lint fixes:

python -m ruff check --fix .
python -m ruff format .

Check the code without changing any files:

python -m ruff check .
python -m ruff format --check .

License

Pony ORM is released under the Apache 2.0 license.

PonyORM community

Please post your questions on Stack Overflow. Meet the PonyORM team, chat with the community members, and get your questions answered on our community Telegram group. Join our newsletter at ponyorm.org. Reach us on Twitter.

Copyright (c) 2013-2026 Pony ORM. All rights reserved. info (at) ponyorm.org

Metadata

Release files for poney 0.8.2

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

Source distribution (sdist)

Source distribution for poney 0.8.2
File Size Uploaded Provenance Actions
poney-0.8.2.tar.gz 364.5 kB Without provenance Details for poney-0.8.2.tar.gz

Built distribution (wheel)

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

Total release size: 794.8 kB

Release files / poney-0.8.2.tar.gz

Download URL poney-0.8.2.tar.gz
Size 364.5 kB
Tags Source
SHA-256 checksum
How to use checksums
b4d83b3de073d39b98cd3a999a80daa1efce277e88ba5daf6caad58ffcb69826
BLAKE2b-256 checksum
How to use checksums
6f230bfff0f412a9c0709ae2603ee31205b6797b77837abaa9d86bcd62923b0b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.7

Release files / poney-0.8.2-py3-none-any.whl

Download URL poney-0.8.2-py3-none-any.whl
Size 430.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
ec15a489ba5994551b64d87eabba199186912bc36ed0e7cff685e0fa150f2daa
BLAKE2b-256 checksum
How to use checksums
2a25c177ee871033f3c93adaec8a54d6795e1bae4fbab1a263746e96121554c9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.7

Security for poney 0.8.2

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.

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