Skip to content

Commit 8ecb567

Browse files
committed
initial commit
1 parent dfcf281 commit 8ecb567

15 files changed

Lines changed: 413 additions & 1 deletion

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,7 @@ venv/
109109
ENV/
110110
env.bak/
111111
venv.bak/
112+
p38venv/
112113

113114
# Spyder project settings
114115
.spyderproject

.idea/.gitignore

Lines changed: 8 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/inspectionProfiles/Project_Default.xml

Lines changed: 26 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/inspectionProfiles/profiles_settings.xml

Lines changed: 6 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/misc.xml

Lines changed: 4 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/modules.xml

Lines changed: 8 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/sqlalchemy-to-ormar.iml

Lines changed: 13 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/vcs.xml

Lines changed: 6 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

README.md

Lines changed: 45 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,46 @@
11
# sqlalchemy-to-ormar
2-
Simple translator from sqlalchemy ORM models to ormar models
2+
3+
# **WORK IN PROGRESS**
4+
5+
Simple translator from `sqlalchemy` ORM models to `ormar` models.
6+
7+
The `ormar` package is an async mini ORM for Python, with support for **Postgres,
8+
MySQL**, and **SQLite**.
9+
10+
To learn more about ormar:
11+
12+
* ormar [github][github]
13+
* ormar [documentation][documentation]
14+
15+
## Supported fields
16+
17+
`sqlalchemy-to-ormar` supports following sqlachemy field types:
18+
19+
* "integer": `ormar.Integer`,
20+
* "small_integer": `ormar.Integer`,
21+
* "big_integer": `ormar.BigInteger`,
22+
* "string": `ormar.String,`
23+
* "text": `ormar.Text,`
24+
* "float": `ormar.Float,`
25+
* "decimal": `ormar.Decimal,`
26+
* "date": `ormar.Date,`
27+
* "datetime": `ormar.DateTime,`
28+
* "time": `ormar.Time,`
29+
* "boolean": `ormar.Boolean`
30+
31+
## Supported relations
32+
33+
sqlalchemy-to-ormar supports both `ForeignKey` as well as `ManyToMany` relations
34+
35+
## Known limitations
36+
37+
sqlalchemy to ormar right now does not support:
38+
39+
* composite (multi-column) primary keys and foreign keys (as ormar does not support
40+
them yet)
41+
* ManyToMany fields names customization (as ormar does not support them yet)
42+
* Model inheritance
43+
44+
45+
[documentation]: https://collerek.github.io/ormar/
46+
[github]: https://github.com/collerek/ormar

requirements.txt

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
ormar
2+
sqlalchemy<=1.3.23
3+
databases
4+
5+
# tests
6+
pytest
7+
pytest-cov
8+
codecov
9+
10+
mypy
11+
12+
# lint
13+
flake8
14+
flake8-black
15+
flake8-bugbear
16+
flake8-import-order
17+
flake8-bandit
18+
flake8-annotations
19+
flake8-builtins
20+
flake8-variables-names
21+
flake8-cognitive-complexity
22+
flake8-functions
23+
flake8-expression-complexity

0 commit comments

Comments
 (0)