backo 0.4.1__tar.gz → 0.4.2__tar.gz
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.
- {backo-0.4.1 → backo-0.4.2}/CHANGELOG.md +6 -0
- {backo-0.4.1 → backo-0.4.2}/PKG-INFO +4 -2
- {backo-0.4.1 → backo-0.4.2}/backo/db/mongo.py +9 -2
- {backo-0.4.1 → backo-0.4.2}/backo/db/postgres/db_handler.py +6 -2
- {backo-0.4.1 → backo-0.4.2}/backo/file/file.py +42 -5
- {backo-0.4.1 → backo-0.4.2}/docs/source/File.md +22 -0
- {backo-0.4.1 → backo-0.4.2}/docs/source/Quickstart.md +4 -2
- {backo-0.4.1 → backo-0.4.2}/pyproject.toml +5 -2
- {backo-0.4.1 → backo-0.4.2}/tests/test_routes.py +3 -3
- {backo-0.4.1 → backo-0.4.2}/uv.lock +17 -4
- {backo-0.4.1 → backo-0.4.2}/.coveragerc +0 -0
- {backo-0.4.1 → backo-0.4.2}/.github/workflows/pylint.yml +0 -0
- {backo-0.4.1 → backo-0.4.2}/.github/workflows/release.yml +0 -0
- {backo-0.4.1 → backo-0.4.2}/.github/workflows/test.yml +0 -0
- {backo-0.4.1 → backo-0.4.2}/.github/workflows/test_examples.yml +0 -0
- {backo-0.4.1 → backo-0.4.2}/.gitignore +0 -0
- {backo-0.4.1 → backo-0.4.2}/.pylintrc +0 -0
- {backo-0.4.1 → backo-0.4.2}/.readthedocs.yaml +0 -0
- {backo-0.4.1 → backo-0.4.2}/CONTRIBUTING.md +0 -0
- {backo-0.4.1 → backo-0.4.2}/LICENSE +0 -0
- {backo-0.4.1 → backo-0.4.2}/README.md +0 -0
- {backo-0.4.1 → backo-0.4.2}/backo/__init__.py +0 -0
- {backo-0.4.1 → backo-0.4.2}/backo/action.py +0 -0
- {backo-0.4.1 → backo-0.4.2}/backo/api_toolbox.py +0 -0
- {backo-0.4.1 → backo-0.4.2}/backo/backoffice.py +0 -0
- {backo-0.4.1 → backo-0.4.2}/backo/collection.py +0 -0
- {backo-0.4.1 → backo-0.4.2}/backo/collection_addon.py +0 -0
- {backo-0.4.1 → backo-0.4.2}/backo/current_user.py +0 -0
- {backo-0.4.1 → backo-0.4.2}/backo/db/__init__.py +0 -0
- {backo-0.4.1 → backo-0.4.2}/backo/db/backo_redirect.py +0 -0
- {backo-0.4.1 → backo-0.4.2}/backo/db/extender/__init__.py +0 -0
- {backo-0.4.1 → backo-0.4.2}/backo/db/extender/db_handler.py +0 -0
- {backo-0.4.1 → backo-0.4.2}/backo/db/generic/db_handler.py +0 -0
- {backo-0.4.1 → backo-0.4.2}/backo/db/generic/filter.py +0 -0
- {backo-0.4.1 → backo-0.4.2}/backo/db/generic/interface.py +0 -0
- {backo-0.4.1 → backo-0.4.2}/backo/db/generic/transformer.py +0 -0
- {backo-0.4.1 → backo-0.4.2}/backo/db/generic/transformer_cache.py +0 -0
- {backo-0.4.1 → backo-0.4.2}/backo/db/memory.py +0 -0
- {backo-0.4.1 → backo-0.4.2}/backo/db/postgres/__init__.py +0 -0
- {backo-0.4.1 → backo-0.4.2}/backo/db/postgres/filter.py +0 -0
- {backo-0.4.1 → backo-0.4.2}/backo/db/postgres/sql_field.py +0 -0
- {backo-0.4.1 → backo-0.4.2}/backo/db/postgres/table_pragma.py +0 -0
- {backo-0.4.1 → backo-0.4.2}/backo/db/postgres/transformers.py +0 -0
- {backo-0.4.1 → backo-0.4.2}/backo/db/restfull.py +0 -0
- {backo-0.4.1 → backo-0.4.2}/backo/db/sql/db_handler.py +0 -0
- {backo-0.4.1 → backo-0.4.2}/backo/db/sql/filter.py +0 -0
- {backo-0.4.1 → backo-0.4.2}/backo/db/sql/sql_field.py +0 -0
- {backo-0.4.1 → backo-0.4.2}/backo/db/sql/table_pragma.py +0 -0
- {backo-0.4.1 → backo-0.4.2}/backo/db/sqlite3/__init__.py +0 -0
- {backo-0.4.1 → backo-0.4.2}/backo/db/sqlite3/db_handler.py +0 -0
- {backo-0.4.1 → backo-0.4.2}/backo/db/sqlite3/filter.py +0 -0
- {backo-0.4.1 → backo-0.4.2}/backo/db/sqlite3/sql_field.py +0 -0
- {backo-0.4.1 → backo-0.4.2}/backo/db/sqlite3/table_pragma.py +0 -0
- {backo-0.4.1 → backo-0.4.2}/backo/db/sqlite3/transformers.py +0 -0
- {backo-0.4.1 → backo-0.4.2}/backo/db/valkeydb.py +0 -0
- {backo-0.4.1 → backo-0.4.2}/backo/db/yml.py +0 -0
- {backo-0.4.1 → backo-0.4.2}/backo/db/yml_dir.py +0 -0
- {backo-0.4.1 → backo-0.4.2}/backo/error.py +0 -0
- {backo-0.4.1 → backo-0.4.2}/backo/file/blob_file.py +0 -0
- {backo-0.4.1 → backo-0.4.2}/backo/file/file_blob_connector.py +0 -0
- {backo-0.4.1 → backo-0.4.2}/backo/file/file_connector.py +0 -0
- {backo-0.4.1 → backo-0.4.2}/backo/file/file_system_connector.py +0 -0
- {backo-0.4.1 → backo-0.4.2}/backo/initialisation/init_script.py +0 -0
- {backo-0.4.1 → backo-0.4.2}/backo/initialisation/templates/__init__.pytemplate +0 -0
- {backo-0.4.1 → backo-0.4.2}/backo/initialisation/templates/backoffice.pytemplate +0 -0
- {backo-0.4.1 → backo-0.4.2}/backo/initialisation/templates/collection.pytemplate +0 -0
- {backo-0.4.1 → backo-0.4.2}/backo/initialisation/templates/main.pytemplate +0 -0
- {backo-0.4.1 → backo-0.4.2}/backo/initialisation/templates/migrate.pytemplate +0 -0
- {backo-0.4.1 → backo-0.4.2}/backo/item.py +0 -0
- {backo-0.4.1 → backo-0.4.2}/backo/log.py +0 -0
- {backo-0.4.1 → backo-0.4.2}/backo/loop_path.py +0 -0
- {backo-0.4.1 → backo-0.4.2}/backo/meta/__init__.py +0 -0
- {backo-0.4.1 → backo-0.4.2}/backo/meta/abstract_meta_handler.py +0 -0
- {backo-0.4.1 → backo-0.4.2}/backo/meta/none_meta_data_handler.py +0 -0
- {backo-0.4.1 → backo-0.4.2}/backo/meta/time_meta_handler.py +0 -0
- {backo-0.4.1 → backo-0.4.2}/backo/meta/time_user_meta_data_handler.py +0 -0
- {backo-0.4.1 → backo-0.4.2}/backo/migration.py +0 -0
- {backo-0.4.1 → backo-0.4.2}/backo/openapi.py +0 -0
- {backo-0.4.1 → backo-0.4.2}/backo/patch.py +0 -0
- {backo-0.4.1 → backo-0.4.2}/backo/ref.py +0 -0
- {backo-0.4.1 → backo-0.4.2}/backo/refs_strategies.py +0 -0
- {backo-0.4.1 → backo-0.4.2}/backo/refslist.py +0 -0
- {backo-0.4.1 → backo-0.4.2}/backo/request_decorators.py +0 -0
- {backo-0.4.1 → backo-0.4.2}/backo/selection.py +0 -0
- {backo-0.4.1 → backo-0.4.2}/backo/sort.py +0 -0
- {backo-0.4.1 → backo-0.4.2}/backo/status.py +0 -0
- {backo-0.4.1 → backo-0.4.2}/backo/transaction.py +0 -0
- {backo-0.4.1 → backo-0.4.2}/docs/Makefile +0 -0
- {backo-0.4.1 → backo-0.4.2}/docs/make.bat +0 -0
- {backo-0.4.1 → backo-0.4.2}/docs/requirements.txt +0 -0
- {backo-0.4.1 → backo-0.4.2}/docs/source/Action.md +0 -0
- {backo-0.4.1 → backo-0.4.2}/docs/source/Authentication.md +0 -0
- {backo-0.4.1 → backo-0.4.2}/docs/source/Cardinalities.md +0 -0
- {backo-0.4.1 → backo-0.4.2}/docs/source/Coding.md +0 -0
- {backo-0.4.1 → backo-0.4.2}/docs/source/Collection.md +0 -0
- {backo-0.4.1 → backo-0.4.2}/docs/source/Database.md +0 -0
- {backo-0.4.1 → backo-0.4.2}/docs/source/Item.md +0 -0
- {backo-0.4.1 → backo-0.4.2}/docs/source/Log.md +0 -0
- {backo-0.4.1 → backo-0.4.2}/docs/source/Migration.md +0 -0
- {backo-0.4.1 → backo-0.4.2}/docs/source/Routing.md +0 -0
- {backo-0.4.1 → backo-0.4.2}/docs/source/Selection.md +0 -0
- {backo-0.4.1 → backo-0.4.2}/docs/source/api_reference.rst +0 -0
- {backo-0.4.1 → backo-0.4.2}/docs/source/conf.py +0 -0
- {backo-0.4.1 → backo-0.4.2}/docs/source/errors.rst +0 -0
- {backo-0.4.1 → backo-0.4.2}/docs/source/index.rst +0 -0
- {backo-0.4.1 → backo-0.4.2}/examples/media_library/README.md +0 -0
- {backo-0.4.1 → backo-0.4.2}/examples/media_library/__init__.py +0 -0
- {backo-0.4.1 → backo-0.4.2}/examples/media_library/backoffice.py +0 -0
- {backo-0.4.1 → backo-0.4.2}/examples/media_library/collections_set/__init__.py +0 -0
- {backo-0.4.1 → backo-0.4.2}/examples/media_library/collections_set/books.py +0 -0
- {backo-0.4.1 → backo-0.4.2}/examples/media_library/collections_set/users.py +0 -0
- {backo-0.4.1 → backo-0.4.2}/examples/media_library/migration.py +0 -0
- {backo-0.4.1 → backo-0.4.2}/examples/media_library/tests.py +0 -0
- {backo-0.4.1 → backo-0.4.2}/examples/nationality/README.md +0 -0
- {backo-0.4.1 → backo-0.4.2}/examples/nationality/__init__.py +0 -0
- {backo-0.4.1 → backo-0.4.2}/examples/nationality/backoffice.py +0 -0
- {backo-0.4.1 → backo-0.4.2}/examples/nationality/collections_set/__init__.py +0 -0
- {backo-0.4.1 → backo-0.4.2}/examples/nationality/collections_set/countries.py +0 -0
- {backo-0.4.1 → backo-0.4.2}/examples/nationality/collections_set/db_country_connector.py +0 -0
- {backo-0.4.1 → backo-0.4.2}/examples/nationality/collections_set/people.py +0 -0
- {backo-0.4.1 → backo-0.4.2}/examples/nationality/tests.py +0 -0
- {backo-0.4.1 → backo-0.4.2}/examples/rest_api_connector/README.md +0 -0
- {backo-0.4.1 → backo-0.4.2}/examples/rest_api_connector/__init__.py +0 -0
- {backo-0.4.1 → backo-0.4.2}/examples/rest_api_connector/backoffice.py +0 -0
- {backo-0.4.1 → backo-0.4.2}/examples/rest_api_connector/collections_set/__init__.py +0 -0
- {backo-0.4.1 → backo-0.4.2}/examples/rest_api_connector/collections_set/users.py +0 -0
- {backo-0.4.1 → backo-0.4.2}/examples/rest_api_connector/collections_set/vms.py +0 -0
- {backo-0.4.1 → backo-0.4.2}/examples/rest_api_connector/collections_set/vms_connector.py +0 -0
- {backo-0.4.1 → backo-0.4.2}/examples/rest_api_connector/config.yaml +0 -0
- {backo-0.4.1 → backo-0.4.2}/examples/rest_api_connector/constants.py +0 -0
- {backo-0.4.1 → backo-0.4.2}/examples/rest_api_connector/requirements.txt +0 -0
- {backo-0.4.1 → backo-0.4.2}/examples/rest_api_connector/rest-api/README.md +0 -0
- {backo-0.4.1 → backo-0.4.2}/examples/rest_api_connector/rest-api/collections_set/__init__.py +0 -0
- {backo-0.4.1 → backo-0.4.2}/examples/rest_api_connector/rest-api/collections_set/vms.py +0 -0
- {backo-0.4.1 → backo-0.4.2}/examples/rest_api_connector/rest-api/config.yaml +0 -0
- {backo-0.4.1 → backo-0.4.2}/examples/rest_api_connector/rest-api/constants.py +0 -0
- {backo-0.4.1 → backo-0.4.2}/examples/rest_api_connector/rest-api/rest_api.py +0 -0
- {backo-0.4.1 → backo-0.4.2}/requirements.txt +0 -0
- {backo-0.4.1 → backo-0.4.2}/tests/__init__.py +0 -0
- {backo-0.4.1 → backo-0.4.2}/tests/temp_root_dir.py +0 -0
- {backo-0.4.1 → backo-0.4.2}/tests/test_action.py +0 -0
- {backo-0.4.1 → backo-0.4.2}/tests/test_api_toolbox.py +0 -0
- {backo-0.4.1 → backo-0.4.2}/tests/test_crud.py +0 -0
- {backo-0.4.1 → backo-0.4.2}/tests/test_current_user.py +0 -0
- {backo-0.4.1 → backo-0.4.2}/tests/test_db_connector.py +0 -0
- {backo-0.4.1 → backo-0.4.2}/tests/test_db_extender_connector.py +0 -0
- {backo-0.4.1 → backo-0.4.2}/tests/test_file.py +0 -0
- {backo-0.4.1 → backo-0.4.2}/tests/test_log.py +0 -0
- {backo-0.4.1 → backo-0.4.2}/tests/test_meta.py +0 -0
- {backo-0.4.1 → backo-0.4.2}/tests/test_migrations.py +0 -0
- {backo-0.4.1 → backo-0.4.2}/tests/test_mongo.py +0 -0
- {backo-0.4.1 → backo-0.4.2}/tests/test_openapi.py +0 -0
- {backo-0.4.1 → backo-0.4.2}/tests/test_reference.py +0 -0
- {backo-0.4.1 → backo-0.4.2}/tests/test_rest_api_connector.py +0 -0
- {backo-0.4.1 → backo-0.4.2}/tests/test_selections.py +0 -0
|
@@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file.
|
|
|
5
5
|
The format is based on [Keep a Changelog](http://keepachangelog.com/)
|
|
6
6
|
and this project adheres to [Semantic Versioning](http://semver.org/).
|
|
7
7
|
|
|
8
|
+
## [0.4.2] 2026-11-18
|
|
9
|
+
|
|
10
|
+
* Fix
|
|
11
|
+
* Fix libmagic1 dependency with puremagic or libmagic if exist
|
|
12
|
+
* Fix mongo and postgress dependency
|
|
13
|
+
|
|
8
14
|
## [0.4.1] 2026-11-18
|
|
9
15
|
|
|
10
16
|
* Feature :
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.5
|
|
2
2
|
Name: backo
|
|
3
|
-
Version: 0.4.
|
|
3
|
+
Version: 0.4.2
|
|
4
4
|
Summary: Back office low code
|
|
5
5
|
Project-URL: GitHub, https://github.com/backo-stricto/backo
|
|
6
6
|
Project-URL: Homepage, https://github.com/backo-stricto/backo
|
|
@@ -34,14 +34,16 @@ Classifier: Programming Language :: Python :: 3
|
|
|
34
34
|
Requires-Python: >=3.12
|
|
35
35
|
Requires-Dist: deepdiff
|
|
36
36
|
Requires-Dist: flask
|
|
37
|
+
Requires-Dist: puremagic
|
|
37
38
|
Requires-Dist: pyjwt
|
|
38
39
|
Requires-Dist: python-jsonpath
|
|
39
|
-
Requires-Dist: python-magic
|
|
40
40
|
Requires-Dist: pyyaml
|
|
41
41
|
Requires-Dist: questionary
|
|
42
42
|
Requires-Dist: redis>=8.1.0
|
|
43
43
|
Requires-Dist: requests
|
|
44
44
|
Requires-Dist: stricto>=0.3.2
|
|
45
|
+
Provides-Extra: libmagic
|
|
46
|
+
Requires-Dist: python-magic; extra == 'libmagic'
|
|
45
47
|
Provides-Extra: mongo
|
|
46
48
|
Requires-Dist: pymongo>=4.17.0; extra == 'mongo'
|
|
47
49
|
Provides-Extra: postgres
|
|
@@ -9,8 +9,15 @@ import copy
|
|
|
9
9
|
from datetime import datetime
|
|
10
10
|
from jsonpath import patch, findall
|
|
11
11
|
|
|
12
|
-
|
|
13
|
-
from
|
|
12
|
+
try:
|
|
13
|
+
from pymongo import MongoClient
|
|
14
|
+
except ImportError:
|
|
15
|
+
MongoClient = None
|
|
16
|
+
|
|
17
|
+
try:
|
|
18
|
+
from bson.objectid import ObjectId
|
|
19
|
+
except ImportError:
|
|
20
|
+
ObjectId = None
|
|
14
21
|
|
|
15
22
|
from stricto import SFilter, Operator
|
|
16
23
|
|
|
@@ -7,7 +7,11 @@ DBHandler for Postgres
|
|
|
7
7
|
from typing import Any
|
|
8
8
|
import copy
|
|
9
9
|
|
|
10
|
-
|
|
10
|
+
try:
|
|
11
|
+
import psycopg as psyco
|
|
12
|
+
except ImportError:
|
|
13
|
+
psyco = None
|
|
14
|
+
|
|
11
15
|
|
|
12
16
|
from stricto import SFilter
|
|
13
17
|
|
|
@@ -72,7 +76,7 @@ class DBPostgresConnector(DBSQLConnector):
|
|
|
72
76
|
"""
|
|
73
77
|
try:
|
|
74
78
|
if not self._db:
|
|
75
|
-
self._db =
|
|
79
|
+
self._db = psyco.connect(self._database_url, **self._db_kwargs)
|
|
76
80
|
self._cursor = self._db.cursor()
|
|
77
81
|
except Exception as e:
|
|
78
82
|
raise DBError(
|
|
@@ -9,7 +9,15 @@ import base64
|
|
|
9
9
|
import binascii
|
|
10
10
|
import sys
|
|
11
11
|
import io
|
|
12
|
-
|
|
12
|
+
|
|
13
|
+
try:
|
|
14
|
+
import magic
|
|
15
|
+
|
|
16
|
+
MIME = magic.Magic(mime=True)
|
|
17
|
+
except ImportError:
|
|
18
|
+
MIME = None
|
|
19
|
+
|
|
20
|
+
import puremagic
|
|
13
21
|
from werkzeug.datastructures import FileStorage
|
|
14
22
|
|
|
15
23
|
# used for developpement
|
|
@@ -23,7 +31,33 @@ from ..log import log_system
|
|
|
23
31
|
|
|
24
32
|
log = log_system.get_or_create_logger("file")
|
|
25
33
|
|
|
26
|
-
|
|
34
|
+
|
|
35
|
+
def get_buffer_mime(b: Any) -> str:
|
|
36
|
+
"""
|
|
37
|
+
return the buffer mime type
|
|
38
|
+
|
|
39
|
+
:param b: the buffer
|
|
40
|
+
:type b: Any
|
|
41
|
+
:return: the mime type
|
|
42
|
+
:rtype: str
|
|
43
|
+
"""
|
|
44
|
+
if MIME:
|
|
45
|
+
return MIME.from_buffer(b)
|
|
46
|
+
|
|
47
|
+
try:
|
|
48
|
+
mime = puremagic.from_string(b, mime=True)
|
|
49
|
+
except puremagic.PureError:
|
|
50
|
+
try:
|
|
51
|
+
text = b.decode("utf-8")
|
|
52
|
+
for c in text:
|
|
53
|
+
if c.isprintable() or c in "\n\r\t":
|
|
54
|
+
continue
|
|
55
|
+
return "application/octet-stream"
|
|
56
|
+
mime = "text/plain"
|
|
57
|
+
except UnicodeDecodeError:
|
|
58
|
+
mime = "application/octet-stream"
|
|
59
|
+
return mime
|
|
60
|
+
|
|
27
61
|
|
|
28
62
|
FILE_MODEL = {
|
|
29
63
|
"filename": String(),
|
|
@@ -66,7 +100,8 @@ def transform_to_filestorage( # pylint: disable=unused-argument
|
|
|
66
100
|
return FileStorage(
|
|
67
101
|
stream=io.BytesIO(data),
|
|
68
102
|
filename=None,
|
|
69
|
-
content_type=MIME.from_buffer(data),
|
|
103
|
+
# content_type=MIME.from_buffer(data),
|
|
104
|
+
content_type=get_buffer_mime(data),
|
|
70
105
|
content_length=len(data),
|
|
71
106
|
)
|
|
72
107
|
|
|
@@ -75,7 +110,8 @@ def transform_to_filestorage( # pylint: disable=unused-argument
|
|
|
75
110
|
return FileStorage(
|
|
76
111
|
stream=io.BytesIO(b),
|
|
77
112
|
filename=None,
|
|
78
|
-
content_type=MIME.from_buffer(b),
|
|
113
|
+
# content_type=MIME.from_buffer(b),
|
|
114
|
+
content_type=get_buffer_mime(b),
|
|
79
115
|
content_length=len(b),
|
|
80
116
|
)
|
|
81
117
|
|
|
@@ -83,7 +119,8 @@ def transform_to_filestorage( # pylint: disable=unused-argument
|
|
|
83
119
|
return FileStorage(
|
|
84
120
|
stream=io.BytesIO(v),
|
|
85
121
|
filename=None,
|
|
86
|
-
content_type=MIME.from_buffer(v),
|
|
122
|
+
# content_type=MIME.from_buffer(v),
|
|
123
|
+
content_type=get_buffer_mime(v),
|
|
87
124
|
content_length=len(v),
|
|
88
125
|
)
|
|
89
126
|
|
|
@@ -103,6 +103,28 @@ can be called in two ways :
|
|
|
103
103
|
3. link to the file are GET \<my-app-name\>/\<collection name\>/\<_id\>/\<path\>
|
|
104
104
|
|
|
105
105
|
|
|
106
|
+
## libmagic or puremagic ?
|
|
107
|
+
|
|
108
|
+
Backo needs to know mime types for files. It can use [puremagic](https://pypi.org/project/puremagic/) (by default) or [libmagic](https://pypi.org/project/python-libmagic/). The last one is more integrated but need `libmagic1` to be installed.
|
|
109
|
+
|
|
110
|
+
```{warning}
|
|
111
|
+
`libmagic` needs libmagic1
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
```bash
|
|
115
|
+
sudo apt-get install libmagic1
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
|
|
119
|
+
```bash
|
|
120
|
+
# using puremagic
|
|
121
|
+
pip install backo
|
|
122
|
+
|
|
123
|
+
# With libmagic
|
|
124
|
+
pip install "backo[libmagic]"
|
|
125
|
+
|
|
126
|
+
```
|
|
127
|
+
|
|
106
128
|
|
|
107
129
|
## API Reference
|
|
108
130
|
|
|
@@ -10,11 +10,13 @@
|
|
|
10
10
|
pip install backo
|
|
11
11
|
|
|
12
12
|
# With mongo
|
|
13
|
-
pip install backo[mongo]
|
|
13
|
+
pip install "backo[mongo]"
|
|
14
14
|
|
|
15
15
|
# With postgres
|
|
16
|
-
pip install backo[postgres]
|
|
16
|
+
pip install "backo[postgres]"
|
|
17
17
|
|
|
18
|
+
# With both
|
|
19
|
+
pip install "backo[mongo, postgres]"
|
|
18
20
|
```
|
|
19
21
|
|
|
20
22
|
## backo_init
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[project]
|
|
2
2
|
name = "backo"
|
|
3
|
-
version = "0.4.
|
|
3
|
+
version = "0.4.2"
|
|
4
4
|
authors = [
|
|
5
5
|
{ name="Bertrand Wallrich", email="Bertrand.Wallrich@inria.fr" },
|
|
6
6
|
]
|
|
@@ -20,7 +20,7 @@ dependencies = [
|
|
|
20
20
|
"pyyaml",
|
|
21
21
|
"deepdiff",
|
|
22
22
|
"questionary",
|
|
23
|
-
"
|
|
23
|
+
"puremagic",
|
|
24
24
|
"redis>=8.1.0",
|
|
25
25
|
"python-jsonpath",
|
|
26
26
|
"stricto>=0.3.2"
|
|
@@ -33,6 +33,9 @@ mongo = [
|
|
|
33
33
|
postgres = [
|
|
34
34
|
"psycopg>=3.3.6",
|
|
35
35
|
]
|
|
36
|
+
libmagic = [
|
|
37
|
+
"python-magic",
|
|
38
|
+
]
|
|
36
39
|
|
|
37
40
|
|
|
38
41
|
[dependency-groups]
|
|
@@ -33,9 +33,9 @@ class TestRoutes(unittest.TestCase):
|
|
|
33
33
|
init this tests
|
|
34
34
|
"""
|
|
35
35
|
|
|
36
|
-
self.backo:Backoffice = None
|
|
37
|
-
self.users_coll:Collection = None
|
|
38
|
-
self.flask:Flask = None
|
|
36
|
+
self.backo: Backoffice = None
|
|
37
|
+
self.users_coll: Collection = None
|
|
38
|
+
self.flask: Flask = None
|
|
39
39
|
self.ctx = None
|
|
40
40
|
self.client = None
|
|
41
41
|
|
|
@@ -49,14 +49,14 @@ wheels = [
|
|
|
49
49
|
|
|
50
50
|
[[package]]
|
|
51
51
|
name = "backo"
|
|
52
|
-
version = "0.4.
|
|
52
|
+
version = "0.4.2"
|
|
53
53
|
source = { editable = "." }
|
|
54
54
|
dependencies = [
|
|
55
55
|
{ name = "deepdiff" },
|
|
56
56
|
{ name = "flask" },
|
|
57
|
+
{ name = "puremagic" },
|
|
57
58
|
{ name = "pyjwt" },
|
|
58
59
|
{ name = "python-jsonpath" },
|
|
59
|
-
{ name = "python-magic" },
|
|
60
60
|
{ name = "pyyaml" },
|
|
61
61
|
{ name = "questionary" },
|
|
62
62
|
{ name = "redis" },
|
|
@@ -65,6 +65,9 @@ dependencies = [
|
|
|
65
65
|
]
|
|
66
66
|
|
|
67
67
|
[package.optional-dependencies]
|
|
68
|
+
libmagic = [
|
|
69
|
+
{ name = "python-magic" },
|
|
70
|
+
]
|
|
68
71
|
mongo = [
|
|
69
72
|
{ name = "pymongo" },
|
|
70
73
|
]
|
|
@@ -93,17 +96,18 @@ requires-dist = [
|
|
|
93
96
|
{ name = "deepdiff" },
|
|
94
97
|
{ name = "flask" },
|
|
95
98
|
{ name = "psycopg", marker = "extra == 'postgres'", specifier = ">=3.3.6" },
|
|
99
|
+
{ name = "puremagic" },
|
|
96
100
|
{ name = "pyjwt" },
|
|
97
101
|
{ name = "pymongo", marker = "extra == 'mongo'", specifier = ">=4.17.0" },
|
|
98
102
|
{ name = "python-jsonpath" },
|
|
99
|
-
{ name = "python-magic" },
|
|
103
|
+
{ name = "python-magic", marker = "extra == 'libmagic'" },
|
|
100
104
|
{ name = "pyyaml" },
|
|
101
105
|
{ name = "questionary" },
|
|
102
106
|
{ name = "redis", specifier = ">=8.1.0" },
|
|
103
107
|
{ name = "requests" },
|
|
104
108
|
{ name = "stricto", specifier = ">=0.3.2" },
|
|
105
109
|
]
|
|
106
|
-
provides-extras = ["mongo", "postgres"]
|
|
110
|
+
provides-extras = ["mongo", "postgres", "libmagic"]
|
|
107
111
|
|
|
108
112
|
[package.metadata.requires-dev]
|
|
109
113
|
dev = [
|
|
@@ -844,6 +848,15 @@ wheels = [
|
|
|
844
848
|
{ url = "https://files.pythonhosted.org/packages/4e/de/748bd7609c71cae5d737f0ba9192f19329f70180ecda8fff3cac02c5abe3/psycopg-3.3.6-py3-none-any.whl", hash = "sha256:a1db9f7148b06a28606767efaca51fa6f9398c5c0a3810519be69d7000bdb631", size = 215490, upload-time = "2026-09-18T13:15:29.374Z" },
|
|
845
849
|
]
|
|
846
850
|
|
|
851
|
+
[[package]]
|
|
852
|
+
name = "puremagic"
|
|
853
|
+
version = "2.3.0"
|
|
854
|
+
source = { registry = "https://pypi.org/simple" }
|
|
855
|
+
sdist = { url = "https://files.pythonhosted.org/packages/a7/8d/4d60110e23f445e2dc106340f9bd5f422bb6c540f4fb21086d3ee44b52ab/puremagic-2.3.0.tar.gz", hash = "sha256:b54e4a69dd37c50bacc879380f132382ab4e9a935529628c8975abcc73e10640", size = 1214491, upload-time = "2026-11-16T04:55:04.12Z" }
|
|
856
|
+
wheels = [
|
|
857
|
+
{ url = "https://files.pythonhosted.org/packages/8c/40/72fcaa2f4b850da0207c111be7d2748a57a1c8e8ab149fdc1618323a0b87/puremagic-2.3.0-py3-none-any.whl", hash = "sha256:15ce035fe4c3f23e884a105d07448a5a81dd2e297985bdb636928ddf89bb3fe7", size = 73366, upload-time = "2026-11-16T04:55:02.784Z" },
|
|
858
|
+
]
|
|
859
|
+
|
|
847
860
|
[[package]]
|
|
848
861
|
name = "pydantic"
|
|
849
862
|
version = "2.14.1"
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{backo-0.4.1 → backo-0.4.2}/examples/rest_api_connector/rest-api/collections_set/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|