[sqlalchemy] Re: How to use sqlcodegen generate SQLModels

2023-03-22 Thread Val Huber
You might want to consider API Logic Server 
.  It includes sqlacodegen, and 
uses it to build an executable project including an API and an Admin App.

On Wednesday, March 22, 2023 at 3:55:20 PM UTC-7 Linson Abah wrote:

> Hi,
> I am trying to convert the schema of a db to SQLModels: I have this short 
> script:
>
>
>
>
>
> *from subprocess import calloutfile = 
> 'models/dvdrental_models.py'generator = 'sqlmodels'call(['sqlacodegen', 
> db_uri, '--generator', generator, '--outfile', outfile])*
> I got this Error.
> sqlacodegen: error: unrecognized arguments: --generator sqlmodels
>
> How do I modify this to work correctly? 
>
> Thank you
>
>

-- 
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/e5c9653b-f8be-4c3f-af17-54212ea4b53an%40googlegroups.com.


Re: [sqlalchemy] How to use sqlcodegen generate SQLModels

2023-03-22 Thread Mike Bayer
hey there-

sqlacodegen support is on their github at 
https://github.com/agronholm/sqlacodegen/discussions/categories/q-a



On Wed, Mar 22, 2023, at 6:55 PM, Linson Abah wrote:
> Hi,
> I am trying to convert the schema of a db to SQLModels: I have this short 
> script:
> 
> *from subprocess import call
> outfile = 'models/dvdrental_models.py'
> generator = 'sqlmodels'
> call(['sqlacodegen', db_uri, '--generator', generator, '--outfile', outfile])
*
> I got this Error.
> sqlacodegen: error: unrecognized arguments: --generator sqlmodels
> 
> How do I modify this to work correctly? 
> 
> Thank you
> 
> 
> -- 
> 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/ecc2b9f3-73a5-4a9a-b02a-4495d22779e2n%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/6e146e19-e1a5-4f21-a78c-dd89c4a042fc%40app.fastmail.com.


[sqlalchemy] How to use sqlcodegen generate SQLModels

2023-03-22 Thread Linson Abah
Hi,
I am trying to convert the schema of a db to SQLModels: I have this short 
script:





*from subprocess import calloutfile = 'models/dvdrental_models.py'generator 
= 'sqlmodels'call(['sqlacodegen', db_uri, '--generator', generator, 
'--outfile', outfile])*
I got this Error.
sqlacodegen: error: unrecognized arguments: --generator sqlmodels

How do I modify this to work correctly? 

Thank you

-- 
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/ecc2b9f3-73a5-4a9a-b02a-4495d22779e2n%40googlegroups.com.