So you want to use the Postgres Array Comparator.
query = session.query(TestUser).filter(TestUser.numbers.contains([some_int])).all()
or
query = session.query(TestUser).filter(TestUser.numbers.any(25)).all()
Related Contents:
- Strange SQLAlchemy error message: TypeError: ‘dict’ object does not support indexing
- sqlalchemy.exc.NoSuchModuleError: Can’t load plugin: sqlalchemy.dialects:postgres
- How can I use UUIDs in SQLAlchemy?
- SQLAlchemy create_all() does not create tables
- How to create an SQL View with SQLAlchemy?
- Return Pandas dataframe from PostgreSQL query with sqlalchemy
- How to write DataFrame to postgres table
- Connecting postgresql with sqlalchemy
- SQLAlchemy multiple foreign keys in one mapped class to the same primary key
- Altering an Enum field using Alembic
- unable to create autoincrementing primary key with flask-sqlalchemy
- SQLAlchemy or psycopg2?
- SQLAlchemy – performing a bulk upsert (if exists, update, else insert) in postgresql
- SQLAlchemy DateTime timezone
- SQLAlchemy “default” vs “server_default” performance
- Updates to JSON field don’t persist to DB
- How to set connection timeout in SQLAlchemy
- Getting the id of the last record inserted for Postgresql SERIAL KEY with Python
- SQLAlchemy IN clause
- SQLAlchemy default DateTime
- jsonify a SQLAlchemy result set in Flask [duplicate]
- SQLAlchemy: Creating vs. Reusing a Session
- Best way to do enum in Sqlalchemy?
- SQLAlchemy: how to filter date field?
- How to use NOT IN clause in sqlalchemy ORM query
- Why is SQLAlchemy insert with sqlite 25 times slower than using sqlite3 directly?
- Writing a connection string when password contains special characters
- Psycopg2 image not found
- Selecting distinct column values in SQLAlchemy/Elixir
- Could not assemble any primary key columns for mapped table
- SQLAlchemy + SQL Injection
- How to perform a left join in SQLALchemy?
- SQLAlchemy Inheritance
- How can I select all rows with sqlalchemy?
- Case insensitive unique model fields in Django?
- Use Django ORM as standalone [duplicate]
- How can I bind a list to a parameter in a custom query in SQLAlchemy?
- How to connect to a remote PostgreSQL database through SSL with Python
- How to increase a counter in SQLAlchemy
- How to give column name dynamically from string variable in sql alchemy filter?
- SQLAlchemy – Mapping self-referential relationship as one to many (declarative form)
- add column to SQLAlchemy Table
- Escape SQL “LIKE” value for Postgres with psycopg2
- Applying LIMIT and OFFSET to all queries in SQLAlchemy
- Is it worth using sqlalchemy-migrate ? [closed]
- sqlalchemy simple example of `sum`, `average`, `min`, `max`
- About refreshing objects in sqlalchemy session
- SQLAlchemy: Scan huge tables using ORM?
- PostgreSQL – how to run VACUUM from code outside transaction block?
- Is possible to create Column in SQLAlchemy which is going to be automatically populated with time when it inserted/updated last time?