Re: [sqlalchemy] Sql constructor

2023-06-08 Thread Mike Bayer
we can't take on maintenance for new extensions within the SQLAlchemy project 
directly but I would encourage you to release your extension as its own 
library; see https://pypi.org/search/?q=sqlalchemy for other examples

On Tue, Jun 6, 2023, at 5:34 PM, Nir Assaraf wrote:
> Hey guys,
> 
> As a part of a project that I'm working on, Iv'e created a SQLAlchemy 
> statement builder using the ast (abstract syntax trees) library.
> This constructor will parse strings that are valid python logical statements 
> and will convert them to the appropriate SQLAlchemy objects.
> 
> For example:
> The constructor will take a string of the following format and a list of 
> models/modelbase in which the columns exist.
> 
> string_a = '(column_a == 2 or column_b == 3) or column_c in [1,2,3]'
> 
> and returns the SQLAlchemy objects that defines this logic and can be used in 
> a query's where clause.
> 
> This was used to automate query building for a projects with thousands of 
> different logics that where defined by the client.
> 
> I was just wondering if you think there is a place for something like that in 
> SQLAlchemy or related projects.
> 
> Best regards,
> 
> Nir
> 
> 
> 
> -- 
> SQLAlchemy - 
> The Python SQL Toolkit and Object Relational Mapper
>  
> http://www.sqlalchemy.org/
>  
> To post example code, please provide an MCVE: Minimal, Complete, and 
> Verifiable Example. See http://stackoverflow.com/help/mcve for a full 
> description.
> --- 
> You received this message because you are subscribed to the Google Groups 
> "sqlalchemy" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to sqlalchemy+unsubscr...@googlegroups.com.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/sqlalchemy/a3617ee6-513f-4d4c-a0bb-04dbf83552c0n%40googlegroups.com
>  
> .

-- 
SQLAlchemy - 
The Python SQL Toolkit and Object Relational Mapper

http://www.sqlalchemy.org/

To post example code, please provide an MCVE: Minimal, Complete, and Verifiable 
Example.  See  http://stackoverflow.com/help/mcve for a full description.
--- 
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sqlalchemy+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sqlalchemy/ac072c46-04f6-48dc-8e73-f6b04b8556ba%40app.fastmail.com.


[sqlalchemy] Sql constructor

2023-06-06 Thread Nir Assaraf
Hey guys,

As a part of a project that I'm working on, Iv'e created a SQLAlchemy 
statement builder using the ast (abstract syntax trees) library.
This constructor will parse strings that are valid python logical 
statements and will convert them to the appropriate SQLAlchemy objects.

For example:
The constructor will take a string of the following format and a list of 
models/modelbase in which the columns exist.

string_a = '(column_a == 2 or column_b == 3) or column_c in [1,2,3]'

and returns the SQLAlchemy objects that defines this logic and can be used 
in a query's where clause.

This was used to automate query building for a projects with thousands of 
different logics that where defined by the client.

I was just wondering if you think there is a place for something like that 
in SQLAlchemy or related projects.

Best regards,

Nir

-- 
SQLAlchemy - 
The Python SQL Toolkit and Object Relational Mapper

http://www.sqlalchemy.org/

To post example code, please provide an MCVE: Minimal, Complete, and Verifiable 
Example.  See  http://stackoverflow.com/help/mcve for a full description.
--- 
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sqlalchemy+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sqlalchemy/a3617ee6-513f-4d4c-a0bb-04dbf83552c0n%40googlegroups.com.