semvec/pypi-packages huggingface dataset:
storage-service 0.0.2
Storage Service is a Django + DRF package that help to work with model.
Requires Python: >=3.6

# Storage Service

**Storage Service** is a Django + DRF package that help to work with model. 
Main advantage of this class is to provide **bulk** operations over the model data 
and upsert for single object with M2M relations. 

## Installation

Use the package manager [pip](https://pip.pypa.io/en/stable/) to install storage-service.

```bash
pip install storage_service
```

## Usage

```python
from storage_service.storage import StorageService

from blogs.helpers import BlogHelper  # optional
from blogs.serializers import BlogSerializer  # drf package


class BlogService(StorageService):
    def __init__(self):
        super().__init__()

        self.helper = BlogHelper  # optional

        self.model = BlogSerializer.Meta.model

        self.create_serializer_class = BlogSerializer
        self.get_serializer_class = BlogSerializer

        self.unique_identifier: str = 'pk'  # required unique model field
        self.unique_identifiers: list = []  # in case when you need more unique model fiedls
```

## Methods
* `def serialize(self, entities, many=False):` - helps deserialize list of objects to dict.


* `def get_next_id(self):` - returns next model primary key.


* `def get_by(self, key: str = '', value=None, serialize=True):` - helps to retrieve 
model data by provided **key** & **value** parameters. If **serialize** is set to `True` then 
method will return deserialized  model data. Otherwise will be returned object.


* `def get_pk(self, pk: int = 0, serialize=False):` - helps to retrieve 
model data by provided **pk** value. If **serialize** is set to `True` then 
method will return deserialized  model data. Otherwise will be returned object.


* `def delete_by(self, key: str = '', value=None):` - helps to delete 
model data by provided **key** & **value** parameters.


* `def set_identifiers(self, data)` - is helper method for bulk type & upsert methods.
Method to add identifiers as dict and to remove identifiers as default element.


* `def indexed(elements=None, index: int = 0, retrieve: bool = False):` - get and / or 
retrieve element at index.


* `def upsert(self, data, parameters=None, many_to_many_clear: bool = True):` - method 
to upsert a single object. Supporting M2M relations. Based on 
`self.unique_identifier` & `self.unique_identifiers`.


* `def bulk_upsert(self, data, parameters=None, many_to_many_clear: bool = True)` - method
to bulk upsert multiple objects. Supporting M2M relations. Based on 
`self.unique_identifier` & `self.unique_identifiers`.


* `def bulk_delete(self, data)` - method to bulk delete multiple objects.


* `def bulk_get_or_create(self, data):` - method to bulk get or create multiple objects.



## Contributing
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Please make sure to update tests as appropriate.

## License
[MIT](https://choosealicense.com/licenses/mit/)
pyBaseApp 1.2
Standard app configuration and packaging
Requires Python: >=3.6

# applauncher module

## Description
The applauncher module defines a standard way to launch and manage a basic application.

## Configuration class
**Configuration** class defines a standard logger which prompts in console and save log in a dated file.
I also define a standard way to configure the app with a settings file in yml format. 
This yml file is a key/value pair collection and allows substitution of values using the syntax {key}

Here is an example of yml file:

    mykey: myvalue
    value_to_substitute: '{otherkey}'
    otherkey: 3
    listkey:
        - key1: value1
        - key2: value2
    dictkey:
        key: value
        otherkey: othervalue
    booleankey: true

## Settings class
**Settings** is a class for which attributes are defined by the given dictionary

## error function
**error** function defines a standard error behaviour by displaying an error and exiting the app
kw3pan 0.0.8
kw3pan
Requires Python: >=3.4

# kw3pan

![PyPI - package version](https://img.shields.io/pypi/v/kw3pan?logo=pypi&style=flat-square)
![PyPI - license](https://img.shields.io/pypi/l/kw3pan?label=package%20license&style=flat-square)
![PyPI - python version](https://img.shields.io/pypi/pyversions/kw3pan?logo=pypi&style=flat-square)
![PyPI - downloads](https://img.shields.io/pypi/dm/kw3pan?logo=pypi&style=flat-square)

![GitHub - last commit](https://img.shields.io/github/last-commit/kkristof200/py_web3_pancakeswap?style=flat-square)
![GitHub - commit activity](https://img.shields.io/github/commit-activity/m/kkristof200/py_web3_pancakeswap?style=flat-square)

![GitHub - code size in bytes](https://img.shields.io/github/languages/code-size/kkristof200/py_web3_pancakeswap?style=flat-square)
![GitHub - repo size](https://img.shields.io/github/repo-size/kkristof200/py_web3_pancakeswap?style=flat-square)
![GitHub - lines of code](https://img.shields.io/tokei/lines/github/kkristof200/py_web3_pancakeswap?style=flat-square)

![GitHub - license](https://img.shields.io/github/license/kkristof200/py_web3_pancakeswap?label=repo%20license&style=flat-square)

## Description

kw3pan

## Install

~~~~bash
pip install kw3pan
# or
pip3 install kw3pan
~~~~

## Usage

~~~~python
import kw3pan
~~~~

## Dependencies

[jsoncodable](https://pypi.org/project/jsoncodable), [kw3](https://pypi.org/project/kw3)