https://github.com/programyazar/sqlalchemy-class-generator
https://github.com/programyazar/sqlalchemy-class-generator
code-generator python python2 sqlalchemy
Last synced: 10 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/programyazar/sqlalchemy-class-generator
- Owner: ProgramYazar
- Created: 2016-11-15T18:50:46.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2016-11-16T06:35:09.000Z (about 9 years ago)
- Last Synced: 2025-01-01T18:43:07.993Z (12 months ago)
- Topics: code-generator, python, python2, sqlalchemy
- Language: Python
- Size: 2.93 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
###READ
Basic tool for generate SqlAlchemy python classes from mysql tables. I dont try with sqlite if you try please send me feedback.
it supports
* enum values
* probably other basic types
* auto increment
* primary key
* accept or not null values
all classes use Base super class, you can declare Base like:
> Base = declarative_base()
Not: please install sqlalchemy from repo or pip before run this command. i dont use any other library for easy usage.
###USAGE
Make file runnable
> $ chmod +x sqla_class
Run it with parameters
> $ ./sqla_class --db_host localhost --db_user root --db_pass "123456" --db_name your_database_name --db_charset utf8 --filename=out.py
you can use parameters like:
* --key value
* -key value
* key value
* --key=value
* -key=value
* key=value
If you have a problem send me email (programyazar[at]gmail[dot]com)