Skip to content

Commit

Permalink
Update to 0.1.1
Browse files Browse the repository at this point in the history
  • Loading branch information
GigantPro committed Jul 21, 2023
1 parent e62bf8c commit 981cce0
Show file tree
Hide file tree
Showing 3 changed files with 60 additions and 2 deletions.
58 changes: 58 additions & 0 deletions frozenclass/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
<p align="center">
<h1 align="center">FrozenClass</h1>
<h2 align="center">This library was created in order to be able to save classes with a single line, as well as load them!</h2>
</a>



<p align="center">
<a href="https://pypi.python.org/pypi/frozenclass"><img alt="Pypi version" src="https://img.shields.io/pypi/v/frozenclass.svg"></a>
<a href="https://pypi.python.org/pypi/frozenclass"><img alt="Python versions" src="https://img.shields.io/badge/python-3.7+ | PyPy-blue.svg"></a>
<img alt="Size" src="https://img.shields.io/github/languages/code-size/GigantPro/frozenclass">
<a href="https://pypi.org/project/frozenclass/"><img alt="Pypi version" src="https://img.shields.io/pypi/l/frozenclass?color=orange"></a>
</p>
<p align="center">
<a href="https://github.com/GigantPro/frozenclass/actions/workflows/tests.yml"><img alt="Testing status" src="https://github.com/GigantPro/frozenclass/actions/workflows/tests.yml/badge.svg?branch=main"></a>
<a href="https://github.com/GigantPro/frozenclass/actions/workflows/linting.yml"><img alt="Linting" src="https://github.com/GigantPro/frozenclass/actions/workflows/linting.yml/badge.svg?branch=main"></a>
</p>

# [Read the docs](https://frozenclass.readthedocs.io/en/latest/)

## Example
```python
from frozenclass import DataController


# Test class
class Test:
test_var = 10


# Init controller class
data_controller = DataController('PATH_TO_SAVE`S FOLDER')

# Save class as file
save_name = data_controller.freeze_class(Test())

# Get all saves classes models
loaded_classes = data_controller.load_save(save_name) # -> Test object

# Get var value
print(test_var.test_var) # -> 10
```

## Installation

```bash
$ pip install frozenclass
```

## Installation from source

### Dependencies:
- **poetry**
```bash
$ git clone https://github.com/GigantPro/frozenclass.git; cd frozenclass-main
$ poetry run build; cd dist
$ pip install $(ls -Art | tail -n 1)
```
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "frozenclass"
version = "0.1.0"
version = "0.1.1"
description = "Python module for convenient storage of classes in files."
authors = ["GigantPro <[email protected]>"]
license = "The GPLv3 License (GPLv3)"
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
with open("pyproject.toml", encoding="utf-8") as file:
VERSION = file.read().split("=")[2].split('"')[1]

with open("README.rst", encoding="utf-8") as f:
with open("frozenclass/README.md", encoding="utf-8") as f:
long_description = f.read()

setup(
Expand Down

0 comments on commit 981cce0

Please sign in to comment.