[sqlalchemy] Re: Just starting with sqlacodegen: wrong command?

2022-06-14 Thread Val Huber
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_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.


Re: [sqlalchemy] Just starting with sqlacodegen: wrong command?

2022-06-14 Thread Javier Garcia
This is what I'm getting when I try to upgrade to 3.0.0b3.

(venv) jgarcia@Javier-PC:/var/www$ sudo pip install sqlacodegen==3.0
ERROR: Could not find a version that satisfies the requirement
sqlacodegen==3.0 (from versions: 1.0.0, 1.1.0, 1.1.1, 1.1.2, 1.1.3, 1.1.4,
1.1.5, 1.1.6, 2.0.0, 2.0.1, 2.1.0, 2.2.0, 2.3.0, 3.0.0b1, 3.0.0b2, 3.0.0b3,
3.0.0rc1)
ERROR: No matching distribution found for sqlacodegen==3.0
(venv) jgarcia@Javier-PC:/var/www$ sudo pip install sqlacodegen==3.0.0b3
Collecting sqlacodegen==3.0.0b3
  Downloading sqlacodegen-3.0.0b3-py3-none-any.whl (19 kB)
Requirement already satisfied: inflect>=4.0.0 in
/usr/local/lib/python3.8/dist-packages (from sqlacodegen==3.0.0b3) (5.6.0)
Requirement already satisfied: SQLAlchemy>=1.4.0 in
/usr/local/lib/python3.8/dist-packages (from sqlacodegen==3.0.0b3) (1.4.37)
Collecting importlib-metadata; python_version < "3.10"
  Downloading importlib_metadata-4.11.4-py3-none-any.whl (18 kB)
Requirement already satisfied: greenlet!=0.4.17; python_version >= "3" and
(platform_machine == "aarch64" or (platform_machine == "ppc64le" or
(platform_machine == "x86_64" or (platform_machine == "amd64" or
(platform_machine == "AMD64" or (platform_machine == "win32" or
platform_machine == "WIN32")) in /usr/local/lib/python3.8/dist-packages
(from SQLAlchemy>=1.4.0->sqlacodegen==3.0.0b3) (1.1.2)
Collecting zipp>=0.5
  Downloading zipp-3.8.0-py3-none-any.whl (5.4 kB)
Installing collected packages: zipp, importlib-metadata, sqlacodegen
  Attempting uninstall: sqlacodegen
Found existing installation: sqlacodegen 2.3.0
Uninstalling sqlacodegen-2.3.0:
  Successfully uninstalled sqlacodegen-2.3.0
Successfully installed importlib-metadata-4.11.4 sqlacodegen-3.0.0b3
zipp-3.8.0
(venv) jgarcia@Javier-PC:/var/www$ sqlscodegen --version

Command 'sqlscodegen' not found, did you mean:

  command 'sqlacodegen' from deb sqlacodegen (1.1.6-2build1)

Try: sudo apt install 

(venv) jgarcia@Javier-PC:/var/www$ sqlacodegen --version
2.3.0

On Tue, Jun 14, 2022 at 5:25 PM Javier Garcia  wrote:

> Thanks Simon, do you know how could I install that version as when I
> upgrade the sqlacodegen I still get the version 2.3.0?
>
> Javier
>
> El martes, 14 de junio de 2022 a las 17:21:31 UTC+1, Simon King escribió:
>
>> Based on the CHANGES file, it looks like --generator is a new option in
>> v3.0.0:
>>
>> https://github.com/agronholm/sqlacodegen/blob/master/CHANGES.rst
>>
>> Simon
>>
>> On Tue, Jun 14, 2022 at 5:06 PM Javier Garcia  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+...@googlegroups.com.
>>> To view this discussion on the web visit
>>> https://groups.google.com/d/msgid/sqlalchemy/6bea9449-3c19-491f-ace7-c17a8440a03an%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/203ea204-b6a2-4a04-84b4-d37eb509aaebn%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 

Re: [sqlalchemy] Just starting with sqlacodegen: wrong command?

2022-06-14 Thread Javier Garcia
Thanks Simon, do you know how could I install that version as when I 
upgrade the sqlacodegen I still get the version 2.3.0?

Javier

El martes, 14 de junio de 2022 a las 17:21:31 UTC+1, Simon King escribió:

> Based on the CHANGES file, it looks like --generator is a new option in 
> v3.0.0:
>
> https://github.com/agronholm/sqlacodegen/blob/master/CHANGES.rst
>
> Simon
>
> On Tue, Jun 14, 2022 at 5:06 PM Javier Garcia  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+...@googlegroups.com.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/sqlalchemy/6bea9449-3c19-491f-ace7-c17a8440a03an%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/203ea204-b6a2-4a04-84b4-d37eb509aaebn%40googlegroups.com.


Re: [sqlalchemy] Just starting with sqlacodegen: wrong command?

2022-06-14 Thread Simon King
Based on the CHANGES file, it looks like --generator is a new option in
v3.0.0:

https://github.com/agronholm/sqlacodegen/blob/master/CHANGES.rst

Simon

On Tue, Jun 14, 2022 at 5:06 PM Javier Garcia  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/6bea9449-3c19-491f-ace7-c17a8440a03an%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/CAFHwexejJ5tB6Ww7kkiZv%3D6jkwVOMf68gHdJ5APvK7VwzOWMTA%40mail.gmail.com.


[sqlalchemy] Just starting with sqlacodegen: wrong command?

2022-06-14 Thread Javier Garcia
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/6bea9449-3c19-491f-ace7-c17a8440a03an%40googlegroups.com.