A great option for creating SQL tables in yaml format.
Project description
It's a script to transform yaml file to SQL-code.
We worked as a migration to the database. You can create your migration through of migration.yaml file inside migrations folder and run the script for migrate.
Install
You can install the script through of pip command:
pip intall flore
Usage
Run the command flore init
to create migration
folder with the follow files:
- migration.yaml
- seed.yaml
- config.yaml
Configuration
For configuration the migration
, open config.yaml
file and set information:
dialect: 'pg'
host: 'localhost'
port: 5432
username: 'postgres'
password: 'docker'
database: 'flore'
dialect
is a name of the database service, for example: mysql, pg => postgres. Currently support postgres
only. Now,
you can set username
, password
, database
, port
and host
for you database.
Migration
For create migration you set in migration.yaml the following information:
tables:
users:
name:
- varchar:120
- required
email:
- varchar:84
- required
- unique
password:
- varchar:255
is_admin:
- boolean
- default false
products:
price:
- float
Run with the follow command
flore run
To migrate tables your postgres database.
Screenshot
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file flore-0.0.2.tar.gz
.
File metadata
- Download URL: flore-0.0.2.tar.gz
- Upload date:
- Size: 5.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.1.3 CPython/3.8.6 Linux/5.8.15-201.fc32.x86_64
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2d1f4890cbd4ef11edcb3598f2a26463c54b9aad727d25d4c6356ce73cb5b5fd |
|
MD5 | 393cd64bee7472385d5f30063decc44e |
|
BLAKE2b-256 | 0ff26be395d0b5bbc06f8281039edfdc3def56d9a4333f54ff54f30b9efdcd96 |
File details
Details for the file flore-0.0.2-py3-none-any.whl
.
File metadata
- Download URL: flore-0.0.2-py3-none-any.whl
- Upload date:
- Size: 7.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.1.3 CPython/3.8.6 Linux/5.8.15-201.fc32.x86_64
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 91aa152a3201d02360b532bc93a924b9f3e278d2f80ed9d3ac0b222073c6dd66 |
|
MD5 | c3335bd4b3f7b5fc7b4bab9a65dc3f8e |
|
BLAKE2b-256 | a2379c64191dd10da7a98a04e4c56fd773ec82de56c4e0d43d47b059e65a17fc |