PyPika VS postgres-typed

Compare PyPika vs postgres-typed and see what are their differences.

PyPika

PyPika is a python SQL query builder that exposes the full richness of the SQL language using a syntax that reflects the resulting query. PyPika excels at all sorts of SQL queries but is especially useful for data analysis. (by kayak)
Our great sponsors
  • WorkOS - The modern identity platform for B2B SaaS
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • SaaSHub - Software Alternatives and Reviews
PyPika postgres-typed
4 5
2,367 26
2.1% -
5.5 0.0
6 days ago over 1 year ago
Python TypeScript
Apache License 2.0 MIT License
The number of mentions indicates the total number of mentions that we've tracked plus the number of user suggested alternatives.
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.

PyPika

Posts with mentions or reviews of PyPika. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2023-07-11.
  • any recommendations for a good query builder library with good support?
    2 projects | /r/learnpython | 11 Jul 2023
    I recently started using drizzle orm and I am now looking for something similar in python, my goal is to be as close to sql syntax as possible without just passing dml commands as strings, type safety would be cool as well, I saw this one pypika but it ha a lot of open issues and no commits for a year, is there anything similar but more stable?
  • Ask HN: Is SQLAlchemy the industry standard Python ORM in 2023?
    2 projects | news.ycombinator.com | 11 Jun 2023
    Yes it is. I haven't seen many Python projects using Prisma and

    Note that there are several types of technologies that can help connect an application to an SQL database:

    - SQL builders: the best known project seems to be Pypika by Kayak (https://github.com/kayak/pypika) but it seems to be dead of sleeping.

  • Write an SQL query builder in 150 lines of Python
    10 projects | news.ycombinator.com | 27 Aug 2021
    https://github.com/kayak/pypika

    Have used in multiple projects and have found it's the right balance between ORMs and writing raw SQL. It's also easily extensible and takes care of the many edge cases and nuances of rolling your own SQL generator.

  • Migrating to SQLAlchemy 2.0
    3 projects | news.ycombinator.com | 18 Feb 2021
    There is a middle-ground between writing SQL statement strings in your code, and a full-blown ORM: query builders. At least in my experience with small to medium projects, these have far fewer footguns while keeping the code composable and readable. Here's one for Python: https://github.com/kayak/pypika

postgres-typed

Posts with mentions or reviews of postgres-typed. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2023-01-24.
  • Kysely: TypeScript SQL Query Builder
    19 projects | news.ycombinator.com | 24 Jan 2023
    This is really cool, will look into using it in future projects!

    I also made a tool (https://github.com/vramework/schemats) that generates the types directly from the db, which means whenever you do a DB migration your database types automatically update. Was forked from the original schemats library a couple years ago.

    I also created a lightweight library ontop of pg that is less of a query builder and more of a typed CRUD + SQL for non trivial queries (https://github.com/vramework/postgres-typed). Most queries I deal with in a day to day is usually crud so I find it a little easier, but it's much less powerful then Kysely! I fall more into the camp of writing complex queries in SQL with small helpers and writing simple ones with util functions and typescript

  • Ask HN: Who Wants to Collaborate?
    58 projects | news.ycombinator.com | 1 Jan 2022
    I'm working on a few projects, from one/two days to platforms.

    The first is OS and is a simple nodeJS environment to deploy applications via lambda and express quickly. Sort of like nestJS except less decorators and more functional (https://vramework.io/). I already know of a few other colleagues that rolled their own propriety versions of this to support enterprise and cloud deployments so decided to OS it.

    The other OS project is a strongly typed postgres/mysql driver. The idea is to generate typescript definitions directly from postgres (https://github.com/vramework/schemats) and then have a think layer ontop of pg-node that gives you strongly typed queries (https://github.com/vramework/postgres-typed).

    An open-source project I spent a few years on the core team is https://deepstream.io/, a realtime-server that allows you to mix and match multiple streaming protocols (mqtt/websocket/others) and allow those clients to talk to each other using pub-sub and records. I'm not longer working for it but wanted to give it a shout out!

    On a non OS project, I have been working on an immersive audio platform for a while now. The main goal is to allow users to pick and choose how audio books progress, and also have a live session mode which allows users to record their pulse / answer questions and a few other metrics and associate it with sentences. I pretty much built and deployed all of it but require some advice/brainstorming on how to proceed now. I built it to satisfy an itch when I was practicing shamanism during the first lockdown when I was in-between contracts / taking time off.

    I also want to build a simple web-pages strategy game based around eco-education, but don't have the bandwidth . If anyone is interested in mixing together gamification and eco-village building might be a fun conversion to bounce ideas!

    All the OS projects above were used to support my personal/a couple professional projects over the last few years.

    Email in profile

  • Write an SQL query builder in 150 lines of Python
    10 projects | news.ycombinator.com | 27 Aug 2021
    I agree with your point that adding multiple layers = more attack vectors and abstraction of a really good domain specific language. But what seems to happen on most of the projects I work on is we end up hiding away extremely common logic behind helper functions. It always starts off with SQL and then slowly gets moved into higher level functions that offer a better developer experience.

    Shameless plug, but I just posted a library I wrote (for node https://github.com/vramework/postgres-typed/blob/master/READ...) which pretty much is a tiny layer ontop of pg-node (which is query based / with value parameters) and provides small util functions with typescript support derived straight from postgres tables.

    In an ideal world (one I think we are getting very close to) I think we will end up having SQL queries validated in our code against the actual DB structure the same way we have any other compilation error. But until then we'll need to rely on tests or helper libraries, and for the purpose of refactoring and development I find the latter more enjoyable (although still far from perfect).

  • Show HN: Node Typed Postgres Query Builder
    1 project | news.ycombinator.com | 27 Aug 2021
  • Show HN: Typed Postgres CRUD Queries
    2 projects | news.ycombinator.com | 27 Aug 2021

What are some alternatives?

When comparing PyPika and postgres-typed you can also consider the following projects:

TinyDB - TinyDB is a lightweight document oriented database optimized for your happiness :)

sql-assassin - Unfancy node.js SQL builder for ES6

sqlc - Generate type-safe code from SQL

sql-athame - Python tool for slicing and dicing SQL

asyncpg - A fast PostgreSQL Database Client Library for Python/asyncio.

Typesense - Open Source alternative to Algolia + Pinecone and an Easier-to-Use alternative to ElasticSearch ⚡ 🔍 ✨ Fast, typo tolerant, in-memory fuzzy Search Engine for building delightful search experiences

tksheet - Python tkinter table widget for displaying tabular data

vox - Vox language compiler. AOT / JIT / Linker. Zero dependencies

PipelineDB - High-performance time-series aggregation for PostgreSQL

xql - SQL builder and utilities library for node.js (runs in browser as well).

pickleDB - pickleDB is an open source key-value store using Python's json module.

deepstream.io - deepstream.io server