tools to code generate python from existing database?
up vote
2
down vote
favorite
Please forgive my ignorance I am new to Python development.
Is there a tool to create Python code from an existing database (e.g. mySQL, Postgresql)
For example, if I have a database designed with sample data inside (I have tables, functions, and data established in a database) is there any code generator tools that will help me to generate some of the python code (e.g. classes/entities, etc.)
python mysql postgresql code-generation
add a comment |
up vote
2
down vote
favorite
Please forgive my ignorance I am new to Python development.
Is there a tool to create Python code from an existing database (e.g. mySQL, Postgresql)
For example, if I have a database designed with sample data inside (I have tables, functions, and data established in a database) is there any code generator tools that will help me to generate some of the python code (e.g. classes/entities, etc.)
python mysql postgresql code-generation
add a comment |
up vote
2
down vote
favorite
up vote
2
down vote
favorite
Please forgive my ignorance I am new to Python development.
Is there a tool to create Python code from an existing database (e.g. mySQL, Postgresql)
For example, if I have a database designed with sample data inside (I have tables, functions, and data established in a database) is there any code generator tools that will help me to generate some of the python code (e.g. classes/entities, etc.)
python mysql postgresql code-generation
Please forgive my ignorance I am new to Python development.
Is there a tool to create Python code from an existing database (e.g. mySQL, Postgresql)
For example, if I have a database designed with sample data inside (I have tables, functions, and data established in a database) is there any code generator tools that will help me to generate some of the python code (e.g. classes/entities, etc.)
python mysql postgresql code-generation
python mysql postgresql code-generation
asked Nov 9 '11 at 21:02
Skyguard
633613
633613
add a comment |
add a comment |
2 Answers
2
active
oldest
votes
up vote
2
down vote
accepted
It sounds like you are describing Object-relational mapping (ORM). One popular ORM for Python is SQLAlchemy.
SQLAlchemy is built into pyramid correct? I haven't used it, but I thought SQLAlchemy takes the classes/entities and makes the database tables... so that would be the opposite of what I need it to do.. but I am not familiar with SQLAlchemy... is this the case?
– Skyguard
Nov 10 '11 at 0:32
2
Actually, SQLAlchemy can swing both ways. See blog.pythonlibrary.org/2010/09/10/….
– Steven Rumbalski
Nov 10 '11 at 2:25
Downvoter, why?
– Steven Rumbalski
Oct 26 '12 at 5:47
add a comment |
up vote
0
down vote
To generate object relational mapper (ORM) models from a pre-existing SQL database, a tool that you may find useful is the Python module sqlacodegen or forked flask-sqlacodegen
These will allow you to build a map of the database on your local disk, to be used with SQLAlchemy and/or Flask.
I have posted here as I stumbled across your question whilst I was looking for these modules.
add a comment |
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
2
down vote
accepted
It sounds like you are describing Object-relational mapping (ORM). One popular ORM for Python is SQLAlchemy.
SQLAlchemy is built into pyramid correct? I haven't used it, but I thought SQLAlchemy takes the classes/entities and makes the database tables... so that would be the opposite of what I need it to do.. but I am not familiar with SQLAlchemy... is this the case?
– Skyguard
Nov 10 '11 at 0:32
2
Actually, SQLAlchemy can swing both ways. See blog.pythonlibrary.org/2010/09/10/….
– Steven Rumbalski
Nov 10 '11 at 2:25
Downvoter, why?
– Steven Rumbalski
Oct 26 '12 at 5:47
add a comment |
up vote
2
down vote
accepted
It sounds like you are describing Object-relational mapping (ORM). One popular ORM for Python is SQLAlchemy.
SQLAlchemy is built into pyramid correct? I haven't used it, but I thought SQLAlchemy takes the classes/entities and makes the database tables... so that would be the opposite of what I need it to do.. but I am not familiar with SQLAlchemy... is this the case?
– Skyguard
Nov 10 '11 at 0:32
2
Actually, SQLAlchemy can swing both ways. See blog.pythonlibrary.org/2010/09/10/….
– Steven Rumbalski
Nov 10 '11 at 2:25
Downvoter, why?
– Steven Rumbalski
Oct 26 '12 at 5:47
add a comment |
up vote
2
down vote
accepted
up vote
2
down vote
accepted
It sounds like you are describing Object-relational mapping (ORM). One popular ORM for Python is SQLAlchemy.
It sounds like you are describing Object-relational mapping (ORM). One popular ORM for Python is SQLAlchemy.
answered Nov 9 '11 at 21:07
Steven Rumbalski
32.9k65892
32.9k65892
SQLAlchemy is built into pyramid correct? I haven't used it, but I thought SQLAlchemy takes the classes/entities and makes the database tables... so that would be the opposite of what I need it to do.. but I am not familiar with SQLAlchemy... is this the case?
– Skyguard
Nov 10 '11 at 0:32
2
Actually, SQLAlchemy can swing both ways. See blog.pythonlibrary.org/2010/09/10/….
– Steven Rumbalski
Nov 10 '11 at 2:25
Downvoter, why?
– Steven Rumbalski
Oct 26 '12 at 5:47
add a comment |
SQLAlchemy is built into pyramid correct? I haven't used it, but I thought SQLAlchemy takes the classes/entities and makes the database tables... so that would be the opposite of what I need it to do.. but I am not familiar with SQLAlchemy... is this the case?
– Skyguard
Nov 10 '11 at 0:32
2
Actually, SQLAlchemy can swing both ways. See blog.pythonlibrary.org/2010/09/10/….
– Steven Rumbalski
Nov 10 '11 at 2:25
Downvoter, why?
– Steven Rumbalski
Oct 26 '12 at 5:47
SQLAlchemy is built into pyramid correct? I haven't used it, but I thought SQLAlchemy takes the classes/entities and makes the database tables... so that would be the opposite of what I need it to do.. but I am not familiar with SQLAlchemy... is this the case?
– Skyguard
Nov 10 '11 at 0:32
SQLAlchemy is built into pyramid correct? I haven't used it, but I thought SQLAlchemy takes the classes/entities and makes the database tables... so that would be the opposite of what I need it to do.. but I am not familiar with SQLAlchemy... is this the case?
– Skyguard
Nov 10 '11 at 0:32
2
2
Actually, SQLAlchemy can swing both ways. See blog.pythonlibrary.org/2010/09/10/….
– Steven Rumbalski
Nov 10 '11 at 2:25
Actually, SQLAlchemy can swing both ways. See blog.pythonlibrary.org/2010/09/10/….
– Steven Rumbalski
Nov 10 '11 at 2:25
Downvoter, why?
– Steven Rumbalski
Oct 26 '12 at 5:47
Downvoter, why?
– Steven Rumbalski
Oct 26 '12 at 5:47
add a comment |
up vote
0
down vote
To generate object relational mapper (ORM) models from a pre-existing SQL database, a tool that you may find useful is the Python module sqlacodegen or forked flask-sqlacodegen
These will allow you to build a map of the database on your local disk, to be used with SQLAlchemy and/or Flask.
I have posted here as I stumbled across your question whilst I was looking for these modules.
add a comment |
up vote
0
down vote
To generate object relational mapper (ORM) models from a pre-existing SQL database, a tool that you may find useful is the Python module sqlacodegen or forked flask-sqlacodegen
These will allow you to build a map of the database on your local disk, to be used with SQLAlchemy and/or Flask.
I have posted here as I stumbled across your question whilst I was looking for these modules.
add a comment |
up vote
0
down vote
up vote
0
down vote
To generate object relational mapper (ORM) models from a pre-existing SQL database, a tool that you may find useful is the Python module sqlacodegen or forked flask-sqlacodegen
These will allow you to build a map of the database on your local disk, to be used with SQLAlchemy and/or Flask.
I have posted here as I stumbled across your question whilst I was looking for these modules.
To generate object relational mapper (ORM) models from a pre-existing SQL database, a tool that you may find useful is the Python module sqlacodegen or forked flask-sqlacodegen
These will allow you to build a map of the database on your local disk, to be used with SQLAlchemy and/or Flask.
I have posted here as I stumbled across your question whilst I was looking for these modules.
answered Nov 10 at 20:17
Mark
548
548
add a comment |
add a comment |
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f8071632%2ftools-to-code-generate-python-from-existing-database%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown