connexion VS SQLAlchemy

Compare connexion vs SQLAlchemy and see what are their differences.

connexion

Connexion is a modern Python web framework that makes spec-first and api-first development easy. (by spec-first)
InfluxDB - Power Real-Time Data Analytics at Scale
Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.
www.influxdata.com
featured
SaaSHub - Software Alternatives and Reviews
SaaSHub helps you find the best software and product alternatives
www.saashub.com
featured
connexion SQLAlchemy
23 124
4,420 8,841
0.3% 2.6%
8.2 9.7
7 days ago 1 day ago
Python Python
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.

connexion

Posts with mentions or reviews of connexion. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2024-03-27.
  • Write OpenAPI with TypeSpec
    7 projects | news.ycombinator.com | 27 Mar 2024
    I like the idea, especially the TS-like syntax around enums and union types. I've always preferred the SDL for GraphQL vs writing OpenAPI for similar reasons.

    I echo the sentiment others have brought up, which is the trade-offs of a code-driven schema vs schema-driven code.

    At work we use Pydantic and FastAPI to generate the OpenAPI contract, but there's some cruft and care needed around exposing those underlying Pydantic models through the API documentation. It's been easy to create schemas that have compatibility problems when run through other code generators. I know there are projects such as connexction[1] which attempt to inverse this, but I don't have much experience with it. In the GraphQL space it seems that code-first approaches are becoming more favored, though there's a different level of complexity needed to create a "typesafe" GraphQL server (eg. model mismatches between root query resolvers and field resolvers).

    [1] https://github.com/spec-first/connexion

  • Connexion 3 released!
    1 project | /r/flask | 3 Nov 2023
    Connexion is a popular Python web framework (~ 5 million downloads per month) that makes spec-first and api-first development easy. You describe your API in an OpenAPI (or swagger) specification with as much detail as you want and Connexion will guarantee that it works as you specified.
  • Connexion 3.0 Released
    1 project | news.ycombinator.com | 3 Nov 2023
  • Show HN: REST Alternative to GraphQL and tRPC
    8 projects | news.ycombinator.com | 10 Oct 2023
    > While REST APIs don't generally provide the same level of control to clients as GraphQL, many times this could be seen as a benefit especially in scenarios where strict control over data access and operations is crucial.

    Rest is more secure, cacheable, and more performant on the server side as field resolution doesn't need to happen like it does with GraphQL. It is not more performant on the client side, and this is a trade-off, but I favor rest applications over GraphQL ones as a DevOps engineer. They are much easier to administer infrastructure-wise, I can cache the requests, etc.

    Data at our company suggests that several small queries actually do better performance-wise than one large one. We switched to GraphQL a year and a half ago or so, but this piece of data seems to suggest that we might have been better off just sticking with REST. My suggestion to that effect was not met with optimism either on the client or server side. Apparently there are server-side benefits as well, allowing for more modular development or something like that.

    I have used OpenAPI using connexion[1]. It was hard to understand at first, but I really liked that the single source of truth was one schema. It also made it really easy to develop against the API because it came with a UI that showed the documentation for all the rest end points and even had test buttons.

    1: https://connexion.readthedocs.io/en/latest/

  • Ask HN: Why is there no specification for Command Line Interfaces?
    5 projects | news.ycombinator.com | 27 Feb 2023
    What's the use case? I was thinking about this exact issue because my product ships several CLI tools, but I wasn't convinced it would be worth the effort.

    An OpenAPI specification describes an HTTP interface, and I see it as useful because it makes it easier to write code in language-of-choice to generate HTTP requests (by generating client libraries from the OpenAPI spec).

    For a CLI, the interface is the command-line. Usually people type these commands, or they end up in bash scripts, or sometimes they get called from programming language of choice by shelling out to the CLI. So I could see a use case for a CLI spec, which would make it easier to generate client libraries (which would shell out to the CLI)... but it seems a little niche.

    Or maybe, as input to a documentation tool (like Swagger docs). I would imagine if you're using a CLI library like Python's Click, most of that data is already there. Click Parameters documentation: https://click.palletsprojects.com/en/8.1.x/parameters/

    Or maybe, you could start from the spec and then generate code which enforces it. So any changes pass through the spec, which would make it easy to write code (server and client-side) / documentation / changelogs. Some projects like this: Guardrail (Scala) https://github.com/guardrail-dev/guardrail , and Connexion (Python) https://github.com/spec-first/connexion .

    But without this ecosystem of tooling, documenting your CLI in a specification didn't really seem worth the effort. Of course, that's a bootstrapping problem.

  • Flask is Great!
    3 projects | /r/flask | 4 Feb 2023
    Connexion is a framework on top of Flask that automagically handles HTTP requests defined using OpenAPI/Swagger.
  • What is the best practice for mapping JSON requests to objects and back to JSON?
    2 projects | /r/flask | 25 Jan 2023
    I recommend you create a OpenAPI Specification and implement a python module that you expose via connexion or on the cli via click(for easy testing).
  • Flask-Powered APIs: Fast, Reliable, and Used by the World's Top Companies
    2 projects | /r/flask | 15 Dec 2022
    I'm here because Swagger-CodeGen created flask-Connexion boilerplate for python.
  • Python REST APIs With Flask, Connexion, and SQLAlchemy – Part 1 – Real Python
    3 projects | /r/Python | 15 Nov 2022
  • Does anybody know any good resources I could use to study ISP architecture?
    2 projects | /r/networking | 12 Nov 2022
    Personally we just prov them using librouteros and flask-connexion/openapi.

SQLAlchemy

Posts with mentions or reviews of SQLAlchemy. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2024-05-03.
  • Python: A SQLAlchemy Wrapper Component That Works With Both Flask and FastAPI Frameworks
    3 projects | dev.to | 3 May 2024
    In SQLAlchemy, models representing database tables typically subclass sqlalchemy.orm.DeclarativeBase (this class supersedes the sqlalchemy.orm.declarative_base function). Accordingly, the abstract base class in this database wrapper component is a sqlalchemy.orm.DeclarativeBase subclass, accompanied by another custom base class providing additional dunder methods.
  • Xz/liblzma: Bash-stage Obfuscation Explained
    1 project | news.ycombinator.com | 31 Mar 2024
    OK -

    can we start considering binary files committed to a repo, even as data for tests, to be a huge red flag, and that the binary files themselves should instead be generated at testing time by source code that's stated as reviewable cleartext. This would make it much harder (though of course we can never really say "impossible") to embed a substantial payload in this way.

    when binary files are part of a test suite, they are typically trying to illustrate some element of the program being tested, in this case a file that was incorrectly xz-encoded. Binary files like these weren't typed by hand, they will always ultimately come from something plaintext source.

    Here's an example! My own SQLAlchemy repository has a few binary files in it! https://github.com/sqlalchemy/sqlalchemy/blob/main/test/bina... oh noes. Why are those files there? well in this case I just wanted to test that I can send large binary BLOBs into the database driver and I was lazy. This is actually pretty dumb, the two binary files here add 35K of useless crap to the source, and I could just as easily generate this binary data on the fly using a two liner that spits out random bytes. Anyone could see that two liner and know that it isn't embedding a malicious payload.

    If I wanted to generate a poorly formed .xz file, I'd illustrate source code that generates random data, runs it through .xz, then applies "corruption" to it, like zeroing out the high bit of every byte. The process by which this occurs would be all reviewable in source code.

  • Introducing Flama for Robust Machine Learning APIs
    11 projects | dev.to | 18 Dec 2023
    Besides, flama also provides support for SQL databases via SQLAlchemy, an SQL toolkit and Object Relational Mapper that gives application developers the full power and flexibility of SQL. Finally, flama also provides support for HTTP clients to perform requests via httpx, a next generation HTTP client for Python.
  • Alembic with Async SQLAlchemy
    1 project | dev.to | 12 Dec 2023
    Alembic is a lightweight database migration tool for usage with SQLAlchemy. The term migration can be a little misleading, because in this context it doesn't mean to migrate to a different database in the sense of using a different version or a different type of database. In this context, migration refers to changes to the database schema: add a new column to a table, modify the type of an existing column, create a new index, etc..
  • Imperative vs. Declarative mapping style in Domain Driven Design project
    1 project | news.ycombinator.com | 28 Oct 2023
  • Unlocking efficient authZ with Cerbos’ Query Plan
    5 projects | dev.to | 6 Sep 2023
    To simplify this process, Cerbos developers have come up with adapters for popular Object-Relational Mapping (ORM) frameworks. You can check out for more details on the query plan repo - which also contains adapters for Prisma and SQLAlchemy - as well as a fully functioning application using Mongoose as its ORM.
  • Python: Just Write SQL
    21 projects | news.ycombinator.com | 14 Aug 2023
    That above pattern is one I've seen people do even recently, using the "select().c" attribute which from very early versions of SQLAlchemy is defined as "the columns from a subquery of the SELECT" ; this usage began raising deprecation warnings in 1.4 and is fully removed in 2.0 as it was a remnant of a much earlier version of SQLAlchemy. it will do exactly as you say, "make a subquery for each filter condition".

    the moment you see SQLAlchemy doing something you see that seems "asinine", send an example to https://github.com/sqlalchemy/sqlalchemy/discussions and I will clarify what's going on, correct the usage so that the query you have is what you expect, and quite often we will add new warnings or documentation when we see people doing things we didn't anticipate.

  • A steering council note about making the global
    3 projects | news.ycombinator.com | 29 Jul 2023
    The creator and lead maintainer of SQLAlchemy, one of the most popular and most used Python library for accessing databases (who doesn't?) gave a rather interesting response to PEP703.

    If this doesn't ring any alarm bells I don't know what will.

    > Basically for the moment the GIL-less idea would likely be burdensome for us and the fact that it's only an "option" seems to strongly imply major compatibility issues that we would not prefer.

    https://github.com/sqlalchemy/sqlalchemy/discussions/10002#d...

  • More public SQL-queryable databases?
    3 projects | /r/datasets | 10 Jul 2023
    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.
  • How useful is Python in accounting and auditing?
    1 project | /r/Accounting | 27 Jun 2023
    When using python with sql databases like postgres or mariadb or SQLite you would use SQLAlchemy or another ORM of if you're feeling brave, you code it by hand. With ORMs you provide the address of your database and it connects for you, letting you use abstractions instead of writing all the SQL yourself (kind of analogous to using vlookups or index match instead of manually entering data).

What are some alternatives?

When comparing connexion and SQLAlchemy you can also consider the following projects:

flask-restful - Simple framework for creating REST APIs

tortoise-orm - Familiar asyncio ORM for python, built with relations in mind

Flask RestPlus - Fully featured framework for fast, easy and documented API development with Flask

PonyORM - Pony Object Relational Mapper

flasgger - Easy OpenAPI specs and Swagger UI for your Flask API

Peewee - a small, expressive orm -- supports postgresql, mysql, sqlite and cockroachdb

django-rest-framework - Web APIs for Django. 🎸

Orator - The Orator ORM provides a simple yet beautiful ActiveRecord implementation.

eve - REST API framework designed for human beings

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

falcon - The no-magic web data plane API and microservices framework for Python developers, with a focus on reliability, correctness, and performance at scale.

pyDAL - A pure Python Database Abstraction Layer