Skip to content

Commit 56a6447

Browse files
committed
Merge branch 'release/v0.0.7'
2 parents 16dc651 + 62581ed commit 56a6447

18 files changed

+120
-82
lines changed

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
__pycache__
2-
src/Rocketstore/test
2+
.venv

CITATION.cff

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,4 +17,4 @@ keywords:
1717
- file
1818
- rocket
1919
license: MIT
20-
version: 0.0.6
20+
version: 0.0.7

MANIFEST.in

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,6 @@ include README.md
44
include *.toml
55
recursive-include src *.py
66
recursive-include src/Rocketstore *.py
7-
recursive-include src/Rocketstore/utils *.py
7+
recursive-include src/Rocketstore/utils *.py
8+
prune */__pycache__
9+
recursive-exclude Samples/*

README.md

Lines changed: 18 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -48,18 +48,31 @@ Compare Rocket-Store, SQL and file system terms:
4848
To use Rocketstore, you must first import the library:
4949

5050
```python
51-
from Rocketstore import Rocketstore, _FORMAT_JSON
51+
from Rocketstore import Rocketstore
5252

5353
rs = Rocketstore()
54+
```
55+
56+
usage of constants:
57+
```python
58+
59+
#method 1:
60+
rs = Rocketstore()
61+
rs.post(..., rs._FORMAT_JSON)
62+
63+
#or
64+
65+
rs.post(..., Rocketstore._FORMAT_JSON)
5466

5567
```
5668

69+
5770
### Post
5871

5972
```python
60-
rs.post(collection="delete_fodders1", key="1", record={"some":"json input"}, flags=_FORMAT_JSON)
73+
rs.post(collection="delete_fodders1", key="1", record={"some":"json input"}, flags=Rocketstore._FORMAT_JSON)
6174
# or
62-
rs.post("delete_fodders1", "1", {"some":"json input"}, _FORMAT_JSON)
75+
rs.post("delete_fodders1", "1", {"some":"json input"}, Rocketstore._FORMAT_JSON)
6376
```
6477

6578
Stores a record in a collection identified by a unique key
@@ -153,10 +166,10 @@ __Options__:
153166
* data_format: Specify which format the records are stored in. Values are: _FORMAT_NATIVE - default. and RS_FORMAT_JSON - Use JSON data format.
154167

155168
```python
156-
rs.options(data_format=_FORMAT_JSON)
169+
rs.options(data_format=Rocketstore._FORMAT_JSON)
157170
# or
158171
rs.options(**{
159-
"data_format": _FORMAT_JSON,
172+
"data_format": Rocketstore._FORMAT_JSON,
160173
...
161174
})
162175
```

Samples/Post/README.md renamed to Samples/README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# Sample implementation
22

3+
Files:
4+
* `generial`: post, get, count, delete
5+
* `post`: post
6+
37
1) create virtual environment `virtual ./.venv`
48
2) activate it ` . ./venv/bin/activate`
59
3) install dependencies `pip install Rocket-Store`

src/Rocketstore/example.py renamed to Samples/generic_example.py

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,19 +9,20 @@
99
Docs: documentation
1010
"""
1111

12-
from .Rocketstore import Rocketstore, _FORMAT_JSON, _FORMAT_NATIVE, _FORMAT_XML, _ADD_AUTO_INC, _ORDER_DESC
12+
from Rocketstore import Rocketstore
1313

14-
rs = Rocketstore(**{"data_storage_area": "./webapp",
15-
"data_format": _FORMAT_JSON})
14+
rs = Rocketstore(**{"data_storage_area": "./test",
15+
"data_format": Rocketstore._FORMAT_JSON})
1616

1717
rs.post("cars", "Mercedes_Benz_GT_R", {"owner": "Lisa Simpson"})
1818

1919
print("GET: ", rs.get("cars", ""), "\n-----\n")
2020
# GET: {'count': 1, 'key': ['Mercedes_Benz_GT_R'], 'result': [{'owner': 'Lisa Simpson'}]}
2121

22-
rs.post("cars", "BMW_740li", {"owner": "Greg Onslow"}, _ADD_AUTO_INC)
23-
rs.post("cars", "BMW_740li", {"owner": "Sam Wise"}, _ADD_AUTO_INC)
24-
rs.post("cars", "BMW_740li", {"owner": "Bill Bo"}, _ADD_AUTO_INC)
22+
rs.post("cars", "BMW_740li", {
23+
"owner": "Greg Onslow"}, Rocketstore._ADD_AUTO_INC)
24+
rs.post("cars", "BMW_740li", {"owner": "Sam Wise"}, Rocketstore._ADD_AUTO_INC)
25+
rs.post("cars", "BMW_740li", {"owner": "Bill Bo"}, Rocketstore._ADD_AUTO_INC)
2526
# tienen que haber un BMW_740li
2627

2728
print("GET ALL CARS: ", rs.get("cars", "*"), "\n-----\n")
@@ -60,7 +61,7 @@
6061

6162

6263
print("Get list ordered by alphabetically descending keys: ",
63-
rs.get("cars", "", _ORDER_DESC), "\n-----\n")
64+
rs.get("cars", "", Rocketstore._ORDER_DESC), "\n-----\n")
6465
'''
6566
Get list ordered by alphabetically descending keys:
6667
{

Samples/Post/test.py renamed to Samples/post.py

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
1-
from Rocketstore import Rocketstore, _ADD_AUTO_INC
1+
from Rocketstore import Rocketstore
22

33
rs = Rocketstore(**{"data_storage_area": "./test"})
44

55
print(rs)
6+
print("test Constants:", rs._ADD_AUTO_INC)
7+
print("test Constants: ", Rocketstore._ADD_AUTO_INC)
68

79
dataInput = {
810
"content": "hello asfalsdfsalfaslflasl",
@@ -17,6 +19,11 @@
1719

1820

1921
out = rs.post("glOtc6EzYQTZEt0J18cU1f4Ycdz1H8WWTDVkBQTp1Gv2BWgb",
20-
"memories", dataInput, _ADD_AUTO_INC)
22+
"memories", dataInput, rs._ADD_AUTO_INC)
23+
24+
print(out)
25+
26+
out = rs.post("glOtc6EzYQTZEt0J18cU1f4Ycdz1H8WWTDVkBQTp1Gv2BWgb",
27+
"memories", dataInput, Rocketstore._ADD_AUTO_INC)
2128

2229
print(out)

dist/Rocket-Store-0.0.5.tar.gz

-20.7 KB
Binary file not shown.

dist/Rocket-Store-0.0.7.tar.gz

16.9 KB
Binary file not shown.
-16.9 KB
Binary file not shown.
16.1 KB
Binary file not shown.

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
44

55
[project]
66
name = "Rocket-Store"
7-
version = "0.0.6"
7+
version = "0.0.7"
88
authors = [
99
{ name="Anton Sychev", email="[email protected]" },
1010
]

src/Rocket_Store.egg-info/PKG-INFO

Lines changed: 23 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Metadata-Version: 2.1
22
Name: Rocket-Store
3-
Version: 0.0.5
3+
Version: 0.0.7
44
Summary: Using the filesystem as a searchable database.
55
Author-email: Anton Sychev <[email protected]>
66
License: Rocket Store
@@ -90,18 +90,31 @@ Compare Rocket-Store, SQL and file system terms:
9090
To use Rocketstore, you must first import the library:
9191

9292
```python
93-
from Rocketstore import Rocketstore, _FORMAT_JSON
93+
from Rocketstore import Rocketstore
9494

9595
rs = Rocketstore()
96+
```
97+
98+
usage of constants:
99+
```python
100+
101+
#method 1:
102+
rs = Rocketstore()
103+
rs.post(..., rs._FORMAT_JSON)
104+
105+
#or
106+
107+
rs.post(..., Rocketstore._FORMAT_JSON)
96108

97109
```
98110

111+
99112
### Post
100113

101114
```python
102-
rs.post(collection="delete_fodders1", key="1", record={"some":"json input"}, flags=_FORMAT_JSON)
115+
rs.post(collection="delete_fodders1", key="1", record={"some":"json input"}, flags=Rocketstore._FORMAT_JSON)
103116
# or
104-
rs.post("delete_fodders1", "1", {"some":"json input"}, _FORMAT_JSON)
117+
rs.post("delete_fodders1", "1", {"some":"json input"}, Rocketstore._FORMAT_JSON)
105118
```
106119

107120
Stores a record in a collection identified by a unique key
@@ -195,10 +208,10 @@ __Options__:
195208
* data_format: Specify which format the records are stored in. Values are: _FORMAT_NATIVE - default. and RS_FORMAT_JSON - Use JSON data format.
196209

197210
```python
198-
rs.options(data_format=_FORMAT_JSON)
211+
rs.options(data_format=Rocketstore._FORMAT_JSON)
199212
# or
200213
rs.options(**{
201-
"data_format": _FORMAT_JSON,
214+
"data_format": Rocketstore._FORMAT_JSON,
202215
...
203216
})
204217
```
@@ -224,9 +237,13 @@ Contributions are welcome. Please open an issue to discuss what you would like t
224237

225238
### Publish to Pypi
226239

240+
***Local:***
227241
```shell
228242
python -m pip install build twine
229243
python3 -m build
230244
twine check dist/*
231245
twine upload dist/*
232246
```
247+
248+
***Live:***
249+
No need do nothing GitHub have Workflow action its publish auto

src/Rocket_Store.egg-info/SOURCES.txt

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,6 @@ LICENSE
33
MANIFEST.in
44
README.md
55
pyproject.toml
6-
src/RocketStore/RocketStore.py
7-
src/RocketStore/Rocketstore.py
8-
src/RocketStore/__init__.py
9-
src/RocketStore/__version__.py
10-
src/RocketStore/example.py
11-
src/RocketStore/utils/__init__.py
12-
src/RocketStore/utils/files.py
136
src/Rocket_Store.egg-info/PKG-INFO
147
src/Rocket_Store.egg-info/SOURCES.txt
158
src/Rocket_Store.egg-info/dependency_links.txt
@@ -18,7 +11,6 @@ src/Rocket_Store.egg-info/top_level.txt
1811
src/Rocketstore/Rocketstore.py
1912
src/Rocketstore/__init__.py
2013
src/Rocketstore/__version__.py
21-
src/Rocketstore/example.py
2214
src/Rocketstore/utils/__init__.py
2315
src/Rocketstore/utils/files.py
2416
tests/test.py

0 commit comments

Comments
 (0)