Not sure how this may match your needs, but API Logic Server includes a 
version of sqlacodegen to create an executable Flask project, including a 
web app, API, and rules-based logic.  It includes a Command Line Utility 
that provides SQLAlchemy URI examples:

(venv) val@Vals-MacBook-Pro-16 ApiLogicServer % *ApiLogicServer examples*


Welcome to API Logic Server 5.02.22


Creates and optionally runs a customizable ApiLogicServer project


Examples:

  ApiLogicServer create-and-run

  ApiLogicServer create-and-run --db_url=sqlite:///nw.sqlite

  ApiLogicServer create-and-run 
--db_url=mysql+pymysql://root:p@mysql-container:3306/classicmodels 
--project_name=/localhost/docker_db_project

  ApiLogicServer create-and-run 
--db_url=mssql+pyodbc://sa:posey386!@localhost:1433/NORTHWND?driver=ODBC+Driver+17+for+SQL+Server&trusted_connection=no

  ApiLogicServer create-and-run 
--db_url=postgresql://postgres:p@10.0.0.234/postgres

  ApiLogicServer create --project_name=my_schema 
--db_url=postgresql://postgres:p@localhost/my_schema

  ApiLogicServer create 
--db_url=postgresql+psycopg2://postgres:password@localhost:5432/postgres?options=-csearch_path%3Dmy_db_schema

  ApiLogicServer create --project_name=Chinook \

    --host=ApiLogicServer.pythonanywhere.com --port= \

    
--db_url=mysql+pymysql://ApiLogicServer:***@ApiLogicServer.mysql.pythonanywhere-services.com/ApiLogicServer\$Chinook


Where --db_url defaults to supplied sample, or, specify URI for your own 
database:

   SQLAlchemy Database URI help: 
https://docs.sqlalchemy.org/en/14/core/engines.html

   Other URI examples:           
https://github.com/valhuber/ApiLogicServer/wiki/Testing

   Install Guide:                
https://github.com/valhuber/ApiLogicServer/wiki/Quick-Start#install-guide

 

Docs: https://github.com/valhuber/ApiLogicServer#readme



(venv) val@Vals-MacBook-Pro-16 ApiLogicServer % 

On Tuesday, June 14, 2022 at 9:06:46 AM UTC-7 tiren...@gmail.com wrote:

> Hi, 
>
> I have tried to run something like this: 
>
> sqlacodegen --generator tables 
> mysql+pymysql://user:password@localhost/dbname
>
> but I get:
>
> usage: sqlacodegen [-h] [--version] [--schema SCHEMA] [--tables TABLES] 
> [--noviews] [--noindexes] [--noconstraints] [--nojoined] [--noinflect] 
> [--noclasses] [--nocomments] [--outfile OUTFILE] [url]
> sqlacodegen: error: unrecognized arguments: --generator 
> mysql+pymysql://root:*******@localhost/test_user
>
> My sqlacodegen version is 2.3.0.
>
> Any help?
>

-- 
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/7e10564c-b467-4869-9095-fd7134a37c4cn%40googlegroups.com.

Reply via email to