TypeDAL 3.1.0__py3-none-any.whl → 3.1.2__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of TypeDAL might be problematic. Click here for more details.
typedal/__about__.py
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: TypeDAL
|
|
3
|
-
Version: 3.1.
|
|
3
|
+
Version: 3.1.2
|
|
4
4
|
Summary: Typing support for PyDAL
|
|
5
5
|
Project-URL: Documentation, https://typedal.readthedocs.io/
|
|
6
6
|
Project-URL: Issues, https://github.com/trialandsuccess/TypeDAL/issues
|
|
@@ -23,7 +23,7 @@ Requires-Dist: python-slugify
|
|
|
23
23
|
Provides-Extra: all
|
|
24
24
|
Requires-Dist: edwh-migrate>=0.8.0; extra == 'all'
|
|
25
25
|
Requires-Dist: py4web; extra == 'all'
|
|
26
|
-
Requires-Dist: pydal2sql[all]>=1.1.
|
|
26
|
+
Requires-Dist: pydal2sql[all]>=1.1.4; extra == 'all'
|
|
27
27
|
Requires-Dist: questionary; extra == 'all'
|
|
28
28
|
Requires-Dist: tabulate; extra == 'all'
|
|
29
29
|
Requires-Dist: tomlkit; extra == 'all'
|
|
@@ -39,7 +39,7 @@ Requires-Dist: types-pyyaml; extra == 'dev'
|
|
|
39
39
|
Requires-Dist: types-tabulate; extra == 'dev'
|
|
40
40
|
Provides-Extra: migrations
|
|
41
41
|
Requires-Dist: edwh-migrate>=0.8.0; extra == 'migrations'
|
|
42
|
-
Requires-Dist: pydal2sql>=1.1.
|
|
42
|
+
Requires-Dist: pydal2sql>=1.1.4; extra == 'migrations'
|
|
43
43
|
Requires-Dist: questionary; extra == 'migrations'
|
|
44
44
|
Requires-Dist: tabulate; extra == 'migrations'
|
|
45
45
|
Requires-Dist: tomlkit; extra == 'migrations'
|
|
@@ -60,7 +60,7 @@ Description-Content-Type: text/markdown
|
|
|
60
60
|
Typing support for [PyDAL](http://web2py.com/books/default/chapter/29/6).
|
|
61
61
|
This package aims to improve the typing support for PyDAL. By using classes instead of the define_table method,
|
|
62
62
|
type hinting the result of queries can improve the experience while developing. In the background, the queries are still
|
|
63
|
-
generated and executed by pydal itself, this package only
|
|
63
|
+
generated and executed by pydal itself, this package only provides some logic to properly pass calls from class methods to
|
|
64
64
|
the underlying `db.define_table` pydal Tables.
|
|
65
65
|
|
|
66
66
|
- `TypeDAL` is the replacement class for DAL that manages the code on top of DAL.
|
|
@@ -76,13 +76,49 @@ the underlying `db.define_table` pydal Tables.
|
|
|
76
76
|
|
|
77
77
|
Version 2.0 also introduces more ORM-like funcionality.
|
|
78
78
|
Most notably, a Typed Query Builder that sees your table classes as models with relationships to each other.
|
|
79
|
-
See [3. Building Queries](https://
|
|
79
|
+
See [3. Building Queries](https://typedal.readthedocs.io/en/stable/3_building_queries/) for more
|
|
80
80
|
details.
|
|
81
81
|
|
|
82
|
-
##
|
|
82
|
+
## CLI
|
|
83
|
+
The Typedal CLI provides a convenient interface for generating SQL migrations for [edwh-migrate](https://github.com/educationwarehouse/migrate#readme)
|
|
84
|
+
from PyDAL or TypeDAL configurations using [pydal2sql](https://github.com/robinvandernoord/pydal2sql).
|
|
85
|
+
It offers various commands to streamline database management tasks.
|
|
83
86
|
|
|
84
|
-
|
|
85
|
-
|
|
87
|
+
### Usage
|
|
88
|
+
|
|
89
|
+
```bash
|
|
90
|
+
typedal --help
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
## Options
|
|
94
|
+
|
|
95
|
+
- `--show-config`: Toggle to show configuration details. Default is `no-show-config`.
|
|
96
|
+
- `--version`: Toggle to display version information. Default is `no-version`.
|
|
97
|
+
- `--install-completion`: Install completion for the current shell.
|
|
98
|
+
- `--show-completion`: Show completion for the current shell, for copying or customization.
|
|
99
|
+
- `--help`: Display help message and exit.
|
|
100
|
+
|
|
101
|
+
## Commands
|
|
102
|
+
|
|
103
|
+
- `cache.clear`: Clear expired items from the cache.
|
|
104
|
+
- `cache.stats`: Show caching statistics.
|
|
105
|
+
- `migrations.fake`: Mark one or more migrations as completed in the database without executing the SQL code.
|
|
106
|
+
- `migrations.generate`: Run `pydal2sql` based on the TypeDAL configuration.
|
|
107
|
+
- `migrations.run`: Run `edwh-migrate` based on the TypeDAL configuration.
|
|
108
|
+
- `setup`: Interactively setup a `[tool.typedal]` entry in the local `pyproject.toml`.
|
|
109
|
+
|
|
110
|
+
### Configuration
|
|
111
|
+
|
|
112
|
+
TypeDAL and its CLI can be configured via `pyproject.toml`.
|
|
113
|
+
See [6. Migrations](https://typedal.readthedocs.io/en/stable/6_migrations/) for more information about configuration.
|
|
114
|
+
|
|
115
|
+
|
|
116
|
+
## TypeDAL for PyDAL users - Quick Overview
|
|
117
|
+
|
|
118
|
+
Below you'll find a quick overview of translation from pydal to TypeDAL.
|
|
119
|
+
For more info, see **[the docs](https://typedal.readthedocs.io/en/latest/)**.
|
|
120
|
+
|
|
121
|
+
---
|
|
86
122
|
|
|
87
123
|
### Translations from pydal to typedal
|
|
88
124
|
|
|
@@ -259,7 +295,7 @@ row: TableName = db.table_name(id=1)
|
|
|
259
295
|
|
|
260
296
|
### All Types
|
|
261
297
|
|
|
262
|
-
See [2. Defining Tables](
|
|
298
|
+
See [2. Defining Tables](https://typedal.readthedocs.io/en/stable/2_defining_tables/)
|
|
263
299
|
|
|
264
300
|
## Caveats
|
|
265
301
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
typedal/__about__.py,sha256=
|
|
1
|
+
typedal/__about__.py,sha256=gCV8IiSioghVQQh1j5X14ZINUEDxXRpOynOxlZXj2iE,206
|
|
2
2
|
typedal/__init__.py,sha256=QQpLiVl9w9hm2LBxey49Y_tCF_VB2bScVaS_mCjYy54,366
|
|
3
3
|
typedal/caching.py,sha256=8UABVAhOlBpL96ykmqhxLaFYOe-XeAh7JoGh57OkxP8,11818
|
|
4
4
|
typedal/cli.py,sha256=3tge8B-YjgjMC6425-RMczmWvpOTfWV5QYPXRY23IWA,18200
|
|
@@ -13,7 +13,7 @@ typedal/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
|
13
13
|
typedal/types.py,sha256=1kGkNX6vfGg6ln84AG558C4Zx5ACRz-emrUTnuy-rRY,3410
|
|
14
14
|
typedal/web2py_py4web_shared.py,sha256=VK9T8P5UwVLvfNBsY4q79ANcABv-jX76YKADt1Zz_co,1539
|
|
15
15
|
typedal/serializers/as_json.py,sha256=ffo152W-sARYXym4BzwX709rrO2-QwKk2KunWY8RNl4,2229
|
|
16
|
-
typedal-3.1.
|
|
17
|
-
typedal-3.1.
|
|
18
|
-
typedal-3.1.
|
|
19
|
-
typedal-3.1.
|
|
16
|
+
typedal-3.1.2.dist-info/METADATA,sha256=S32eeFw4Q_CtdquHJC_P3c1XVpWPilBsGFzbWaThlqM,9270
|
|
17
|
+
typedal-3.1.2.dist-info/WHEEL,sha256=KGYbc1zXlYddvwxnNty23BeaKzh7YuoSIvIMO4jEhvw,87
|
|
18
|
+
typedal-3.1.2.dist-info/entry_points.txt,sha256=m1wqcc_10rHWPdlQ71zEkmJDADUAnZtn7Jac_6mbyUc,44
|
|
19
|
+
typedal-3.1.2.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|