Orm framework for python

Orm framework for python

Tweak Pony ORM to meet specific requirements or develop a complete app using Python, TypeScript and ReactJS. The team of software development experts from our partner AgileCode can provide custom development for your project. Email us to info at ponyorm.org with a summary of your needs and we will give you an estimate of time and price.

Using Pony object-relational mapper you can concentrate on writing business logic of your application and use Python syntax for interacting with the database. Pony translates such queries into SQL and executes them in the database in the most efficient way.

Here is Pony query example:

select(c for c in Customer if sum(c.orders.price) > 1000)

which is being translated into the following SQL:

SELECT «c».»id»
FROM «customer» «c»
LEFT JOIN «order» «order-1»
ON «c».»id» = «order-1″.»customer»
GROUP BY «c».»id»
HAVING coalesce(SUM(«order-1″.»total_price»), 0) > 1000

SELECT `c`.`id`
FROM `customer` `c`
LEFT JOIN `order` `order-1`
ON `c`.`id` = `order-1`.`customer`
GROUP BY `c`.`id`
HAVING coalesce(SUM(`order-1`.`total_price`), 0) > 1000

SELECT «c».»id»
FROM «Customer» «c»
LEFT JOIN «Order» «order-1»
ON «c».»id» = «order-1″.»customer»
GROUP BY «c».»id»
HAVING coalesce(SUM(«order-1″.»total_price»), 0) > 1000

SELECT «c».»id»
FROM «CUSTOMER» «c»
LEFT JOIN «ORDER» «order-1»
ON «c».»id» = «order-1″.»customer»
GROUP BY «c».»id»
HAVING coalesce(SUM(«order-1″.»total_price»), 0) > 1000

Schema

You can start modeling your application right now. Once your data diagram is ready, you can start using it with Pony ORM or get SQL statements for creating tables.

Rocket

If you know Python you already know how to write queries with Pony.

Nerd

Pony is good for beginners due to its pythonic syntax. But besides this it also provides great performance due to smart caching.

Box

Pony now supports a native database JSON data type that enables efficient access to data in JSON format.

Pony is by far the best SQL ORM for fast prototyping, thanks to its Entity-Relationship Diagram Editor and its pythonic style. It’s my first choice when dealing with an SQL database oriented application. The learning curve is very lean and you can start using it really fast.

It’s certainly the most intuitive & Pythonistic approach to querying databases and is very similar to LINQ in that aspect.

I use Pony in production. It allows me to create webapps much faster than any other ORM I’ve tried, and produces sensible, performant SQL both in production with Postgres and when testing with SQLite.

PonyORM pythonic queries are just fun to work with. Of all the main ORM’s out there, Pony is the one with the most intuitive interface, most of the time when you get one of those «I bet this should work» moments, it actually does! Easy to set up, easy to work with, it even has a great Entity Relationship Diagram editor that throws out the code you’ll need to start your project. I really recommend you try PonyORM on your next project.

I think that Pony ORM is the best ORM in terms of convenience and ease of use. Currently I’m working on developing an ORM for Nim language (nim-lang.org) and I get a lot of inspiration from Pony.

I choose Pony ORM for its performance and ability to write clear and concise code using domain-specific language (DSL). The absence of DSL in SQLAlchemy was the main reason I was looking for an alternative to it, because without using DSL the code looks heavy and cumbersome.

I like Pony ORM for it being intuitive. First queries I wrote without reading the documentation, and it was crucial for me in the beginning. When I started working on my project I didn’t have experience neither with Python, nor with Pony. Later I used documentation, which covered all questions that I had.

Pony ORM is a great software. Its integration with the Python language using generator expression is superb and makes it easy to write queries using known syntax instead of using a new language. Coming from C#/LINQ world I find it very intuitive, powerful and nice to use, so any C# developer coming to Python should definitely try this.

We have been using Pony ORM in our projects for several years. The query syntax is very intuitive which makes writing the business logic really an easy task. The sub-collections is a real gem! Especially when using the attribute lifting feature and collection sorting.

Источник

Top 23 Python ORM Projects

Write Clean Python Code. Always.. Sonar helps you commit clean code every time. With over 225 unique rules to find Python bugs, code smells & vulnerabilities, Sonar finds the issues while you focus on the work.

SQLAlchemy

Recently I discovered BigQuery public datasets — just over 200 datasets available for directly querying via SQL. I think this is a great thing! I can connect these direct to an analytics platform (we use Apache Superset which uses Python SQLAlchemy under the hood) for example and just start dashboarding.

MongoEngine

tortoise-orm

Project mention: How to Connect a FastAPI Server to PostgreSQL and Deploy on GCP Cloud Run | dev.to | 2023-05-26

PonyORM

GINO

InfluxDB

Collect and Analyze Billions of Data Points in Real Time. Manage all types of time series data in a single, purpose-built database. Run at any scale in any environment in the cloud, on-premises, or at the edge.

PynamoDB

sandman2

Project mention: Nocodb: Turns Any MySQL, Postgres, SQLite into a Spreadsheet with REST APIs | news.ycombinator.com | 2022-10-04

https://github.com/jeffknupp/sandman2 works with many different backends including sqlite, but postgrest definitely have the auth flow and security model right for these things.

django-cacheops

orm

Orator

Project mention: Im writing a telegram bot that simulates the Uber apps. I would have to store the orders that receives so I can fulfill them. What’s the best way to store them so I can process them? | /r/TelegramBots | 2023-04-16

If you write in Python, I recommend using the Orator-ORM library, a very handy thing for quickly and safely working with MySQL.

ormar

beanie

Project mention: What ORM/ODM do you use for mongo? or which one do you suggest for a large scale application | /r/Python | 2023-06-05

prisma-client-py

Prisma Client Python is an auto-generated and fully type-safe database client designed for ease of use

Источник

Читайте также:  Selenium with python pdf
Оцените статью