cloud-python-vars 0.1.0__py3-none-any.whl → 0.1.1__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.
- {cloud_python_vars-0.1.0.dist-info → cloud_python_vars-0.1.1.dist-info}/METADATA +16 -9
- cloud_python_vars-0.1.1.dist-info/RECORD +6 -0
- cloud_python_vars-0.1.0.dist-info/RECORD +0 -6
- {cloud_python_vars-0.1.0.dist-info → cloud_python_vars-0.1.1.dist-info}/WHEEL +0 -0
- {cloud_python_vars-0.1.0.dist-info → cloud_python_vars-0.1.1.dist-info}/licenses/LICENSE +0 -0
- {cloud_python_vars-0.1.0.dist-info → cloud_python_vars-0.1.1.dist-info}/top_level.txt +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: cloud-python-vars
|
|
3
|
-
Version: 0.1.
|
|
3
|
+
Version: 0.1.1
|
|
4
4
|
Summary: To manage and create raw Python variables on cloud servers.
|
|
5
5
|
Author-email: ThatOnePythonDev <khakhang2h5e@gmail.com>
|
|
6
6
|
Classifier: Programming Language :: Python :: 3
|
|
@@ -16,7 +16,12 @@ Dynamic: license-file
|
|
|
16
16
|
|
|
17
17
|
A Python module for managing Cloud Variables.
|
|
18
18
|
|
|
19
|
+
## IMPORTANT NOTES
|
|
20
|
+
|
|
21
|
+
Since this module is built upon the package upstash-redis, you **MUST** visit the website right [here](https://console.upstash.com/redis) to create tokens and the link that are **nessecary** for the following examples.
|
|
22
|
+
|
|
19
23
|
## Examples:
|
|
24
|
+
|
|
20
25
|
### Example 1 for the `CloudVar` class.
|
|
21
26
|
|
|
22
27
|
```python
|
|
@@ -56,6 +61,7 @@ print(cloudvar.items()) # {}
|
|
|
56
61
|
```
|
|
57
62
|
|
|
58
63
|
### Example 2 for the class `AsyncCloudVar`.
|
|
64
|
+
|
|
59
65
|
```python
|
|
60
66
|
import cloud_variables as cv
|
|
61
67
|
import asyncio
|
|
@@ -67,29 +73,29 @@ async def main(): # Use asynchronous functions for full functionality access.
|
|
|
67
73
|
|
|
68
74
|
# Basic assignment
|
|
69
75
|
async_cloudvar["string"] = "Hello, World!"
|
|
70
|
-
|
|
76
|
+
|
|
71
77
|
# Retrieving values
|
|
72
78
|
print(async_cloudvar["string"]) # 'Hello, World!'
|
|
73
|
-
|
|
79
|
+
|
|
74
80
|
# Advanced mutable objects
|
|
75
81
|
async_cloudvar["list"] = [1, 2, 3]
|
|
76
82
|
async_cloudvar["list"].append(4)
|
|
77
|
-
|
|
83
|
+
|
|
78
84
|
print(async_cloudvar["list"]) # [1, 2, 3, 4]
|
|
79
|
-
|
|
85
|
+
|
|
80
86
|
# Deleting and popping items
|
|
81
87
|
async_cloudvar["key1"] = "value1"
|
|
82
88
|
async_cloudvar["key2"] = "value2"
|
|
83
|
-
|
|
89
|
+
|
|
84
90
|
del async_cloudvar["key1"] # Deleting keys.
|
|
85
91
|
value = await async_cloudvar.pop("key2") # Popping keys
|
|
86
92
|
print(value) # 'value2'
|
|
87
|
-
|
|
93
|
+
|
|
88
94
|
# Some more methods
|
|
89
|
-
|
|
95
|
+
|
|
90
96
|
# Retrieving Python key-value pairs as dictionaries
|
|
91
97
|
print(await async_cloudvar.items()) # {'string': 'Hello, World!', 'list': [1, 2, 3, 4]}
|
|
92
|
-
|
|
98
|
+
|
|
93
99
|
# Clearing everything
|
|
94
100
|
await async_cloudvar.clear()
|
|
95
101
|
print(await async_cloudvar.items()) # {}
|
|
@@ -100,6 +106,7 @@ asyncio.run(main())
|
|
|
100
106
|
## Installation
|
|
101
107
|
|
|
102
108
|
You can easily install the module by typing the command:
|
|
109
|
+
|
|
103
110
|
```bash
|
|
104
111
|
pip install cloud-python-vars
|
|
105
112
|
```
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
cloud_variables.py,sha256=ui99sO77W4X7JxfhCpwMu2fub5YV4g5lXPggP5thTL4,11017
|
|
2
|
+
cloud_python_vars-0.1.1.dist-info/licenses/LICENSE,sha256=QrYZJWmrewKHOtQwd1ymTUDpPzhnXt9Fhv6PGf-JfGs,35788
|
|
3
|
+
cloud_python_vars-0.1.1.dist-info/METADATA,sha256=I0keUtd2pLn7Vhb4fnxJYCi7DFsK9sH25Q2rKtRKr1s,3088
|
|
4
|
+
cloud_python_vars-0.1.1.dist-info/WHEEL,sha256=YVMoNqKzERt-wjUZwJ33xBGAwnFl-4cqbYkTtWa4itE,91
|
|
5
|
+
cloud_python_vars-0.1.1.dist-info/top_level.txt,sha256=DxTkZ9m7oYGS873O2K7iiP6cP4t0LRqo9jL1wn-Voog,16
|
|
6
|
+
cloud_python_vars-0.1.1.dist-info/RECORD,,
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
cloud_variables.py,sha256=ui99sO77W4X7JxfhCpwMu2fub5YV4g5lXPggP5thTL4,11017
|
|
2
|
-
cloud_python_vars-0.1.0.dist-info/licenses/LICENSE,sha256=QrYZJWmrewKHOtQwd1ymTUDpPzhnXt9Fhv6PGf-JfGs,35788
|
|
3
|
-
cloud_python_vars-0.1.0.dist-info/METADATA,sha256=xTlDt5P8Lf5VCSWeNJ1y18QveGk740QZ1sf42yaunU4,2870
|
|
4
|
-
cloud_python_vars-0.1.0.dist-info/WHEEL,sha256=YVMoNqKzERt-wjUZwJ33xBGAwnFl-4cqbYkTtWa4itE,91
|
|
5
|
-
cloud_python_vars-0.1.0.dist-info/top_level.txt,sha256=DxTkZ9m7oYGS873O2K7iiP6cP4t0LRqo9jL1wn-Voog,16
|
|
6
|
-
cloud_python_vars-0.1.0.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|