dictature 0.11.0__tar.gz → 0.11.1__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.
Files changed (25) hide show
  1. {dictature-0.11.0/src/dictature.egg-info → dictature-0.11.1}/PKG-INFO +7 -2
  2. {dictature-0.11.0 → dictature-0.11.1}/README.md +6 -1
  3. {dictature-0.11.0 → dictature-0.11.1}/pyproject.toml +1 -1
  4. {dictature-0.11.0 → dictature-0.11.1}/src/dictature/backend/directory.py +7 -1
  5. {dictature-0.11.0 → dictature-0.11.1/src/dictature.egg-info}/PKG-INFO +7 -2
  6. {dictature-0.11.0 → dictature-0.11.1}/LICENSE +0 -0
  7. {dictature-0.11.0 → dictature-0.11.1}/setup.cfg +0 -0
  8. {dictature-0.11.0 → dictature-0.11.1}/src/dictature/__init__.py +0 -0
  9. {dictature-0.11.0 → dictature-0.11.1}/src/dictature/backend/__init__.py +0 -0
  10. {dictature-0.11.0 → dictature-0.11.1}/src/dictature/backend/misp.py +0 -0
  11. {dictature-0.11.0 → dictature-0.11.1}/src/dictature/backend/mock.py +0 -0
  12. {dictature-0.11.0 → dictature-0.11.1}/src/dictature/backend/sqlite.py +0 -0
  13. {dictature-0.11.0 → dictature-0.11.1}/src/dictature/backend/webdav.py +0 -0
  14. {dictature-0.11.0 → dictature-0.11.1}/src/dictature/dictature.py +0 -0
  15. {dictature-0.11.0 → dictature-0.11.1}/src/dictature/transformer/__init__.py +0 -0
  16. {dictature-0.11.0 → dictature-0.11.1}/src/dictature/transformer/aes.py +0 -0
  17. {dictature-0.11.0 → dictature-0.11.1}/src/dictature/transformer/gzip.py +0 -0
  18. {dictature-0.11.0 → dictature-0.11.1}/src/dictature/transformer/hmac.py +0 -0
  19. {dictature-0.11.0 → dictature-0.11.1}/src/dictature/transformer/mock.py +0 -0
  20. {dictature-0.11.0 → dictature-0.11.1}/src/dictature/transformer/passthrough.py +0 -0
  21. {dictature-0.11.0 → dictature-0.11.1}/src/dictature/transformer/pipeline.py +0 -0
  22. {dictature-0.11.0 → dictature-0.11.1}/src/dictature.egg-info/SOURCES.txt +0 -0
  23. {dictature-0.11.0 → dictature-0.11.1}/src/dictature.egg-info/dependency_links.txt +0 -0
  24. {dictature-0.11.0 → dictature-0.11.1}/src/dictature.egg-info/top_level.txt +0 -0
  25. {dictature-0.11.0 → dictature-0.11.1}/tests/test_operations.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: dictature
3
- Version: 0.11.0
3
+ Version: 0.11.1
4
4
  Summary: dictature -- A generic wrapper around dict-like interface with mulitple backends
5
5
  Author-email: Adam Hlavacek <git@adamhlavacek.com>
6
6
  Project-URL: Homepage, https://github.com/esoadamo/dictature
@@ -13,7 +13,12 @@ License-File: LICENSE
13
13
 
14
14
  # Dictature
15
15
 
16
- A wrapper for Python's dictionary with multiple backends.
16
+ Make a Python dictionary out of anything. A wrapper for Python's dictionary with multiple backends.
17
+ Thread-safe, supports multiple backends, and allows for transformers to change how the data is stored.
18
+
19
+ SQLite, directory, webdav, and more backends are supported, and you can easily create your own backend.
20
+
21
+ [![PyPI version](https://badge.fury.io/py/dictature.svg)](https://badge.fury.io/py/dictature)
17
22
 
18
23
  ## Installation
19
24
 
@@ -1,6 +1,11 @@
1
1
  # Dictature
2
2
 
3
- A wrapper for Python's dictionary with multiple backends.
3
+ Make a Python dictionary out of anything. A wrapper for Python's dictionary with multiple backends.
4
+ Thread-safe, supports multiple backends, and allows for transformers to change how the data is stored.
5
+
6
+ SQLite, directory, webdav, and more backends are supported, and you can easily create your own backend.
7
+
8
+ [![PyPI version](https://badge.fury.io/py/dictature.svg)](https://badge.fury.io/py/dictature)
4
9
 
5
10
  ## Installation
6
11
 
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "dictature"
7
- version = "0.11.0"
7
+ version = "0.11.1"
8
8
  description = "dictature -- A generic wrapper around dict-like interface with mulitple backends"
9
9
  authors = [
10
10
  { name = "Adam Hlavacek", email = "git@adamhlavacek.com" }
@@ -1,3 +1,5 @@
1
+ import tempfile
2
+ import os
1
3
  from pathlib import Path
2
4
  from typing import Iterable, Union
3
5
  from shutil import rmtree
@@ -48,7 +50,11 @@ class DictatureTableDirectory(DictatureTableMock):
48
50
 
49
51
  def set(self, item: str, value: Value) -> None:
50
52
  file_target = self.__item_path(item)
51
- file_target_tmp = file_target.with_suffix('.tmp')
53
+
54
+ # Create temporary file for atomic write
55
+ handle, file_target_tmp_path = tempfile.mkstemp(prefix=file_target.name, suffix='.tmp', dir=file_target.parent)
56
+ os.close(handle)
57
+ file_target_tmp = Path(file_target_tmp_path)
52
58
 
53
59
  save_data = self.__value_serializer.serialize(value)
54
60
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: dictature
3
- Version: 0.11.0
3
+ Version: 0.11.1
4
4
  Summary: dictature -- A generic wrapper around dict-like interface with mulitple backends
5
5
  Author-email: Adam Hlavacek <git@adamhlavacek.com>
6
6
  Project-URL: Homepage, https://github.com/esoadamo/dictature
@@ -13,7 +13,12 @@ License-File: LICENSE
13
13
 
14
14
  # Dictature
15
15
 
16
- A wrapper for Python's dictionary with multiple backends.
16
+ Make a Python dictionary out of anything. A wrapper for Python's dictionary with multiple backends.
17
+ Thread-safe, supports multiple backends, and allows for transformers to change how the data is stored.
18
+
19
+ SQLite, directory, webdav, and more backends are supported, and you can easily create your own backend.
20
+
21
+ [![PyPI version](https://badge.fury.io/py/dictature.svg)](https://badge.fury.io/py/dictature)
17
22
 
18
23
  ## Installation
19
24
 
File without changes
File without changes