flore-0.0.2
توضیحات
A great option for creating SQL tables in yaml format.
| ویژگی | مقدار |
|---|---|
| سیستم عامل | - |
| نام فایل | flore-0.0.2 |
| نام | flore |
| نسخه کتابخانه | 0.0.2 |
| نگهدارنده | [] |
| ایمیل نگهدارنده | [] |
| نویسنده | Marcus Pereira |
| ایمیل نویسنده | hi@marcuspereira.xyz |
| آدرس صفحه اصلی | https://github.com/marcuxyz/flore |
| آدرس اینترنتی | https://pypi.org/project/flore/ |
| مجوز | MIT |
  
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:
```bash
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:
```yaml
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:
```yaml
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
```yaml
flore run
```
To migrate tables your postgres database.
# Screenshot



نیازمندی
| مقدار | نام |
|---|---|
| >=7.1.2,<8.0.0 | click |
| >=5.3.1,<6.0.0 | PyYAML |
| >=2.8.6,<3.0.0 | psycopg2-binary |
زبان مورد نیاز
| مقدار | نام |
|---|---|
| >=3.8,<4.0 | Python |
نحوه نصب
نصب پکیج whl flore-0.0.2:
pip install flore-0.0.2.whl
نصب پکیج tar.gz flore-0.0.2:
pip install flore-0.0.2.tar.gz