sqliter-py 0.12.0__py3-none-any.whl → 0.17.0__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.
- sqliter/constants.py +4 -3
- sqliter/exceptions.py +29 -0
- sqliter/helpers.py +27 -0
- sqliter/model/model.py +21 -4
- sqliter/orm/__init__.py +17 -0
- sqliter/orm/fields.py +412 -0
- sqliter/orm/foreign_key.py +8 -0
- sqliter/orm/m2m.py +784 -0
- sqliter/orm/model.py +308 -0
- sqliter/orm/query.py +221 -0
- sqliter/orm/registry.py +440 -0
- sqliter/query/query.py +573 -51
- sqliter/sqliter.py +182 -47
- sqliter/tui/__init__.py +62 -0
- sqliter/tui/__main__.py +6 -0
- sqliter/tui/app.py +179 -0
- sqliter/tui/demos/__init__.py +96 -0
- sqliter/tui/demos/base.py +114 -0
- sqliter/tui/demos/caching.py +283 -0
- sqliter/tui/demos/connection.py +150 -0
- sqliter/tui/demos/constraints.py +211 -0
- sqliter/tui/demos/crud.py +154 -0
- sqliter/tui/demos/errors.py +231 -0
- sqliter/tui/demos/field_selection.py +150 -0
- sqliter/tui/demos/filters.py +389 -0
- sqliter/tui/demos/models.py +248 -0
- sqliter/tui/demos/ordering.py +156 -0
- sqliter/tui/demos/orm.py +537 -0
- sqliter/tui/demos/results.py +241 -0
- sqliter/tui/demos/string_filters.py +210 -0
- sqliter/tui/demos/timestamps.py +126 -0
- sqliter/tui/demos/transactions.py +177 -0
- sqliter/tui/runner.py +116 -0
- sqliter/tui/styles/app.tcss +130 -0
- sqliter/tui/widgets/__init__.py +7 -0
- sqliter/tui/widgets/code_display.py +81 -0
- sqliter/tui/widgets/demo_list.py +65 -0
- sqliter/tui/widgets/output_display.py +92 -0
- {sqliter_py-0.12.0.dist-info → sqliter_py-0.17.0.dist-info}/METADATA +28 -14
- sqliter_py-0.17.0.dist-info/RECORD +48 -0
- {sqliter_py-0.12.0.dist-info → sqliter_py-0.17.0.dist-info}/WHEEL +2 -2
- sqliter_py-0.17.0.dist-info/entry_points.txt +3 -0
- sqliter_py-0.12.0.dist-info/RECORD +0 -15
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: sqliter-py
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.17.0
|
|
4
4
|
Summary: Interact with SQLite databases using Python and Pydantic
|
|
5
5
|
Author: Grant Ramsay
|
|
6
6
|
Author-email: Grant Ramsay <grant@gnramsay.com>
|
|
@@ -20,14 +20,19 @@ Classifier: Topic :: Database :: Front-Ends
|
|
|
20
20
|
Classifier: Topic :: Software Development
|
|
21
21
|
Classifier: Topic :: Software Development :: Libraries :: Python Modules
|
|
22
22
|
Requires-Dist: pydantic>=2.12.5
|
|
23
|
+
Requires-Dist: textual>=7.3.0 ; extra == 'demo'
|
|
23
24
|
Requires-Dist: inflect==7.0.0 ; extra == 'extras'
|
|
25
|
+
Requires-Dist: inflect>=7.0.0 ; extra == 'full'
|
|
26
|
+
Requires-Dist: textual>=7.3.0 ; extra == 'full'
|
|
24
27
|
Requires-Python: >=3.9
|
|
25
|
-
Project-URL: Bug Tracker, https://github.com/seapagan/sqliter-py/issues
|
|
26
|
-
Project-URL: Changelog, https://github.com/seapagan/sqliter-py/blob/main/CHANGELOG.md
|
|
27
28
|
Project-URL: Homepage, http://sqliter.grantramsay.dev
|
|
28
29
|
Project-URL: Pull Requests, https://github.com/seapagan/sqliter-py/pulls
|
|
30
|
+
Project-URL: Bug Tracker, https://github.com/seapagan/sqliter-py/issues
|
|
31
|
+
Project-URL: Changelog, https://github.com/seapagan/sqliter-py/blob/main/CHANGELOG.md
|
|
29
32
|
Project-URL: Repository, https://github.com/seapagan/sqliter-py
|
|
33
|
+
Provides-Extra: demo
|
|
30
34
|
Provides-Extra: extras
|
|
35
|
+
Provides-Extra: full
|
|
31
36
|
Description-Content-Type: text/markdown
|
|
32
37
|
|
|
33
38
|
# SQLiter <!-- omit in toc -->
|
|
@@ -45,8 +50,7 @@ is Pydantic itself.
|
|
|
45
50
|
|
|
46
51
|
It does not aim to be a full-fledged ORM like SQLAlchemy, but rather a simple
|
|
47
52
|
and easy-to-use library for basic database operations, especially for small
|
|
48
|
-
projects. It is NOT asynchronous
|
|
49
|
-
time).
|
|
53
|
+
projects. It is NOT asynchronous (at this time, though that is planned).
|
|
50
54
|
|
|
51
55
|
The ideal use case is more for Python CLI tools that need to store data in a
|
|
52
56
|
database-like format without needing to learn SQL or use a full ORM.
|
|
@@ -55,11 +59,10 @@ Full documentation is available on the [Website](https://sqliter.grantramsay.dev
|
|
|
55
59
|
|
|
56
60
|
> [!CAUTION]
|
|
57
61
|
>
|
|
58
|
-
> This project is still in
|
|
59
|
-
>
|
|
60
|
-
>
|
|
61
|
-
>
|
|
62
|
-
> breaking changes.
|
|
62
|
+
> This project is still in development and is lacking some planned
|
|
63
|
+
> functionality. Please use with caution - Classes and methods may change until
|
|
64
|
+
> a stable release is made. I'll try to keep this to an absolute minimum and the
|
|
65
|
+
> releases and documentation will be very clear about any breaking changes.
|
|
63
66
|
>
|
|
64
67
|
> See the [TODO](TODO.md) for planned features and improvements.
|
|
65
68
|
|
|
@@ -87,6 +90,7 @@ Full documentation is available on the [Website](https://sqliter.grantramsay.dev
|
|
|
87
90
|
- Custom exceptions for better error handling
|
|
88
91
|
- Full type hinting and type checking
|
|
89
92
|
- Detailed documentation and examples
|
|
93
|
+
- Interactive TUI demo for exploring features
|
|
90
94
|
- No external dependencies other than Pydantic
|
|
91
95
|
- Full test coverage
|
|
92
96
|
- Can optionally output the raw SQL queries being executed for debugging
|
|
@@ -122,9 +126,9 @@ Currently by default, the only external dependency is Pydantic. However, there
|
|
|
122
126
|
are some optional dependencies that can be installed to enable additional
|
|
123
127
|
features:
|
|
124
128
|
|
|
125
|
-
- `
|
|
126
|
-
|
|
127
|
-
|
|
129
|
+
- `demo`: Installs the Textual TUI framework for the interactive demo
|
|
130
|
+
- `extras`: Installs Inflect for better pluralization of table names
|
|
131
|
+
- `full`: Installs all optional dependencies (Textual and Inflect)
|
|
128
132
|
|
|
129
133
|
See [Installing Optional
|
|
130
134
|
Dependencies](https://sqliter.grantramsay.dev/installation#optional-dependencies)
|
|
@@ -173,6 +177,16 @@ See the [Guide](https://sqliter.grantramsay.dev/guide/guide/) section of the
|
|
|
173
177
|
documentation for more detailed information on how to use SQLiter, and advanced
|
|
174
178
|
features.
|
|
175
179
|
|
|
180
|
+
You can also run the interactive TUI demo to explore SQLiter features hands-on:
|
|
181
|
+
|
|
182
|
+
```bash
|
|
183
|
+
# Install the demo
|
|
184
|
+
uv add sqliter-py[demo]
|
|
185
|
+
|
|
186
|
+
# Run the demo
|
|
187
|
+
sqliter-demo
|
|
188
|
+
```
|
|
189
|
+
|
|
176
190
|
## Contributing
|
|
177
191
|
|
|
178
192
|
Contributions are welcome! Please feel free to submit a Pull Request.
|
|
@@ -187,7 +201,7 @@ which you can read in the [CODE_OF_CONDUCT](CODE_OF_CONDUCT.md) file.
|
|
|
187
201
|
This project is licensed under the MIT License.
|
|
188
202
|
|
|
189
203
|
```pre
|
|
190
|
-
Copyright (c) 2024-
|
|
204
|
+
Copyright (c) 2024-2026 Grant Ramsay
|
|
191
205
|
|
|
192
206
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
193
207
|
of this software and associated documentation files (the "Software"), to deal
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
sqliter/__init__.py,sha256=ECfn02OPmiMCQvRYbfizKFhVDk00xV-HV1s2cH9037I,244
|
|
2
|
+
sqliter/constants.py,sha256=lZ5PKJRofr9Hh8-R7QFt06DV0LiGb3MGY8D-rTklMCk,1279
|
|
3
|
+
sqliter/exceptions.py,sha256=bWqy6EzzRCCv-vxTOwd_i0nfwpOlXEYEa4HDUUzpEOI,7450
|
|
4
|
+
sqliter/helpers.py,sha256=acIa7agubVzXwG4l5zGtTvYg1Z4pD9n6oqdRYBNsxCc,4273
|
|
5
|
+
sqliter/model/__init__.py,sha256=IZC6you0Wt2o0OovmgBIszt7JzuIY7kMFBpcLwIhcCI,1304
|
|
6
|
+
sqliter/model/foreign_key.py,sha256=aaUJ-02o2_g9JOaxUoicaGTwNwjFS_Si4eYec0bMrqY,5381
|
|
7
|
+
sqliter/model/model.py,sha256=pQ5XZrvVDfCcdh4T-BJ0Do7qf1oqKdcmQJxSfLlu7G8,8752
|
|
8
|
+
sqliter/model/unique.py,sha256=-Jh56jBv5cjWmZpChwm5jDb_hZBvcqP0gy6MeCNyJvk,827
|
|
9
|
+
sqliter/orm/__init__.py,sha256=l5kksUc8MyahrVAngwTaXDnLJwGtXJi_DIbylTpmUlk,618
|
|
10
|
+
sqliter/orm/fields.py,sha256=P5qxVNwNeFgTmO1ctzEUC7GKyCn-MoojYUjyzDU5tkA,14270
|
|
11
|
+
sqliter/orm/foreign_key.py,sha256=vMoI5deMsi34eocIyniAIXuWSf5jyOZ_nh2kCPhrbMc,154
|
|
12
|
+
sqliter/orm/m2m.py,sha256=235FponEwY6hr-4ePYti3yBDDu9ik8prZjNHcHeOY9k,25017
|
|
13
|
+
sqliter/orm/model.py,sha256=73kthoC98WXnugyiI6hft4tyX_WbgQL3KZha6kkgP1Y,12594
|
|
14
|
+
sqliter/orm/query.py,sha256=QvOU86c6l_wqKGlCBeGNjkcmTybK0a984eo7pauPngw,5970
|
|
15
|
+
sqliter/orm/registry.py,sha256=DzPOjaLWftdN0JffBUL5ykkmUK5GVTjQO3OdJNx-5oY,15367
|
|
16
|
+
sqliter/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
17
|
+
sqliter/query/__init__.py,sha256=MRajhjTPJqjbmmrwndVKj8vqMbK5-XufpwoIswQf5z4,239
|
|
18
|
+
sqliter/query/query.py,sha256=8QsXjDsnto2d5O-GNCF1HehudTAPDYHqXKDTQZI3ULA,50759
|
|
19
|
+
sqliter/sqliter.py,sha256=PCN-olQdkazZtIAUSTQXUiPqtFk1JmsecWgbBxDOomA,43061
|
|
20
|
+
sqliter/tui/__init__.py,sha256=1-WNXJUzPp_y8FZh1XWzSGzCG1gd9-PP8QGZmDJAXl4,1325
|
|
21
|
+
sqliter/tui/__main__.py,sha256=AYPstbNjxExN1BoPOuOvhOzKKZ25uT6y27FMe8UrOYQ,142
|
|
22
|
+
sqliter/tui/app.py,sha256=D-hveUTrqFOjFTfO66SGmy1Xy_13Cbh03WUJVqHjNkw,5689
|
|
23
|
+
sqliter/tui/demos/__init__.py,sha256=sxrpJ0RQTddL-X-nB_TSjS8HNk5kNIgye1YiRdy8dAE,3014
|
|
24
|
+
sqliter/tui/demos/base.py,sha256=p-C2sV3waLKTVYgqSbO87s2mRUngwTvrPdTea1hXUqo,3343
|
|
25
|
+
sqliter/tui/demos/caching.py,sha256=G0-Yx336rVlY_Hwdn6s9eyIoAQ_iyJvkaMPTryTF30o,8602
|
|
26
|
+
sqliter/tui/demos/connection.py,sha256=xHi9nBFy3nCXDOUgAkF1PfdGTVufqMB3ctVvBYunv4E,4378
|
|
27
|
+
sqliter/tui/demos/constraints.py,sha256=E-RuXOTtD7DywsvBd7QSjTAGkTSm8ef15Y1rKHPLRLY,6468
|
|
28
|
+
sqliter/tui/demos/crud.py,sha256=ltuxUgyhWAxt94FpSs9he_P1YBhI6P1OZpI4g3ueHhg,4112
|
|
29
|
+
sqliter/tui/demos/errors.py,sha256=_WC9ngcfa335nBwCJc3q2WWLnEJqZy20yNYN78PG9rY,6990
|
|
30
|
+
sqliter/tui/demos/field_selection.py,sha256=5wzmIRSxE0CiZoRJN4l2SSyAmn8n7vyL26cDrW8SWVs,4211
|
|
31
|
+
sqliter/tui/demos/filters.py,sha256=4k-0NVUPP-12eHMSt1OKHj88eHbiK_95nX2KilObBOo,11193
|
|
32
|
+
sqliter/tui/demos/models.py,sha256=_jhXLvfWiUd3GuHheAMGmi7eK0prpK3hU2fanoAjBKQ,7129
|
|
33
|
+
sqliter/tui/demos/ordering.py,sha256=IU8rrBXja5rS6_tMHTvcLadc3TBXF2lISNFe5dtuS3Y,4200
|
|
34
|
+
sqliter/tui/demos/orm.py,sha256=JugNjKeHM0hRuD_V6tJzyaL3po-ELDA9ep2phElMazA,17235
|
|
35
|
+
sqliter/tui/demos/results.py,sha256=lYVRinbMLSnsm-fDqcs-4vXLzS0j1VmwLWWCPUlUiIE,6830
|
|
36
|
+
sqliter/tui/demos/string_filters.py,sha256=ACq0qsXKwyzZDwkyl1l77-A-1f37T59FahooPDWrMmM,6385
|
|
37
|
+
sqliter/tui/demos/timestamps.py,sha256=6UXnzJsLR6nqMLSKNwjpHOeiHbVp7svgNDc8w9kL5gc,3941
|
|
38
|
+
sqliter/tui/demos/transactions.py,sha256=jYotIzwx2dZSb1aYWQMJeLG7WMlEoHJ3JtuWI49xdKQ,5508
|
|
39
|
+
sqliter/tui/runner.py,sha256=r39oyJzMk7TSmmYFNxeA-sZa-plKcmywPcQUNUNQgy0,3254
|
|
40
|
+
sqliter/tui/styles/app.tcss,sha256=mra0V9P9hPoamAWHQCnPFnWufHYXk58XZHfORz47kV0,1868
|
|
41
|
+
sqliter/tui/widgets/__init__.py,sha256=B9xwBki0O0WonVlh-HBNhHzi55rAx34hMv4-T6Ph4oM,296
|
|
42
|
+
sqliter/tui/widgets/code_display.py,sha256=Ctn7LbMEL0yYEbGtQqTv46XPmky_UA1lbBW4c31HI2k,2173
|
|
43
|
+
sqliter/tui/widgets/demo_list.py,sha256=d017WVyFoQ3tYbf_KW251dLRbPS-0lf-yhWzIVZ56mY,1841
|
|
44
|
+
sqliter/tui/widgets/output_display.py,sha256=VDIGMMijI_yDRm5WUCxMA9FoKlL0ezngqJn1SEih7PE,2641
|
|
45
|
+
sqliter_py-0.17.0.dist-info/WHEEL,sha256=XV0cjMrO7zXhVAIyyc8aFf1VjZ33Fen4IiJk5zFlC3g,80
|
|
46
|
+
sqliter_py-0.17.0.dist-info/entry_points.txt,sha256=s5eRk657kq0LNqMwAgNH_F93M8aqMeLt122OZ5CQb9s,50
|
|
47
|
+
sqliter_py-0.17.0.dist-info/METADATA,sha256=UZwP_bWoqUlmkKx5dU_x0ctP4Dz1FHJydTFRo7RAseA,7976
|
|
48
|
+
sqliter_py-0.17.0.dist-info/RECORD,,
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
sqliter/__init__.py,sha256=ECfn02OPmiMCQvRYbfizKFhVDk00xV-HV1s2cH9037I,244
|
|
2
|
-
sqliter/constants.py,sha256=pNKalajchG6YvXw0-lTMKOJ_OL2xPSs_3YuOuVsqkVk,1257
|
|
3
|
-
sqliter/exceptions.py,sha256=a0Ine1MeHDOjSG3RzMeLVwGfJXrl1YQW4eeUfj6SKJI,6560
|
|
4
|
-
sqliter/helpers.py,sha256=d6k4oWl43Se_c8rAmX8Zj0_sf2O-bpaaeu33VN2IcsI,3442
|
|
5
|
-
sqliter/model/__init__.py,sha256=IZC6you0Wt2o0OovmgBIszt7JzuIY7kMFBpcLwIhcCI,1304
|
|
6
|
-
sqliter/model/foreign_key.py,sha256=aaUJ-02o2_g9JOaxUoicaGTwNwjFS_Si4eYec0bMrqY,5381
|
|
7
|
-
sqliter/model/model.py,sha256=UOD5yO5CizHFWye_BlG28keSK6qWRdHQVI79Y7ovQ9o,8058
|
|
8
|
-
sqliter/model/unique.py,sha256=-Jh56jBv5cjWmZpChwm5jDb_hZBvcqP0gy6MeCNyJvk,827
|
|
9
|
-
sqliter/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
10
|
-
sqliter/query/__init__.py,sha256=MRajhjTPJqjbmmrwndVKj8vqMbK5-XufpwoIswQf5z4,239
|
|
11
|
-
sqliter/query/query.py,sha256=_IDd3tNKogcFYnh-8Ev0Py3SF7G5Igb5VJbhRq4VJPk,30460
|
|
12
|
-
sqliter/sqliter.py,sha256=F3yi816ZkmuzhabhPiCEX7YkoE4Hi3FsjCKKfHKAAlk,38235
|
|
13
|
-
sqliter_py-0.12.0.dist-info/WHEEL,sha256=RRVLqVugUmFOqBedBFAmA4bsgFcROUBiSUKlERi0Hcg,79
|
|
14
|
-
sqliter_py-0.12.0.dist-info/METADATA,sha256=dP1zmzrNB2J3Sj9u1_UfeDYmqzZneyJPmAD19e22pHM,7623
|
|
15
|
-
sqliter_py-0.12.0.dist-info/RECORD,,
|