semvec/pypi-packages huggingface dataset:
sqlite-oop 0.0.3
python sqlite OOP class
Requires Python: >=3.6

# sqlite oop

### sqlite Object Oriented

```python
from sqliteoop import sqlite
db = sqlite("./demo.db")

# create table
createtable = db.table("user_name").create_table({
    "id":"INTEGER PRIMARY KEY AUTOINCREMENT",
    "name":"VARCHAR(80) NOT NULL"
})
print(createtable)

# create datas
insert = db.table("user_name").insert([{"name": "davie"}, {"name": "johan"}])

# create data
insert = db.table("user_name").create({"name": "davie"})

# delete
db.table("user_name").where("id",1).delete()
db.table("user_name").where("name","davie").delete()

# update
db.table("user_name").where("name","davie").updata({"name":"lisa"})

# select
db.table("user_name").where("name","<>","davie").limit(5).select("*")

# find
db.table("user_name").where("name","johan").find("*")

```
pyformatters-consolidate 0.4.87
Sherpa Consolidation formatter
Requires Python: >=3.8

# pyformatters_consolidate

[![license](https://img.shields.io/github/license/oterrier/pyformatters_consolidate)](https://github.com/oterrier/pyformatters_consolidate/blob/master/LICENSE)
[![tests](https://github.com/oterrier/pyformatters_consolidate/workflows/tests/badge.svg)](https://github.com/oterrier/pyformatters_consolidate/actions?query=workflow%3Atests)
[![codecov](https://img.shields.io/codecov/c/github/oterrier/pyformatters_consolidate)](https://codecov.io/gh/oterrier/pyformatters_consolidate)
[![docs](https://img.shields.io/readthedocs/pyformatters_consolidate)](https://pyformatters_consolidate.readthedocs.io)
[![version](https://img.shields.io/pypi/v/pyformatters_consolidate)](https://pypi.org/project/pyformatters_consolidate/)
[![PyPI - Python Version](https://img.shields.io/pypi/pyversions/pyformatters_consolidate)](https://pypi.org/project/pyformatters_consolidate/)

Consolidate annotations coming from different annotators

## Installation

You can simply `pip install pyformatters_consolidate`.

## Developing

### Pre-requesites

You will need to install `flit` (for building the package) and `tox` (for orchestrating testing and documentation building):

```
python3 -m pip install flit tox
```

Clone the repository:

```
git clone https://github.com/oterrier/pyformatters_consolidate
```

### Running the test suite

You can run the full test suite against all supported versions of Python (3.8) with:

```
tox
```

### Building the documentation

You can build the HTML documentation with:

```
tox -e docs
```

The built documentation is available at `docs/_build/index.html.
pysegmenters-rules 0.5.89
Rule-based segmenter
Requires Python: >=3.8

# pysegmenters_rules

[![license](https://img.shields.io/github/license/oterrier/pysegmenters_rules)](https://github.com/oterrier/pysegmenters_rules/blob/master/LICENSE)
[![tests](https://github.com/oterrier/pysegmenters_rules/workflows/tests/badge.svg)](https://github.com/oterrier/pysegmenters_rules/actions?query=workflow%3Atests)
[![codecov](https://img.shields.io/codecov/c/github/oterrier/pysegmenters_rules)](https://codecov.io/gh/oterrier/pysegmenters_rules)
[![docs](https://img.shields.io/readthedocs/pysegmenters_rules)](https://pysegmenters_rules.readthedocs.io)
[![version](https://img.shields.io/pypi/v/pysegmenters_rules)](https://pypi.org/project/pysegmenters_rules/)
[![PyPI - Python Version](https://img.shields.io/pypi/pyversions/pysegmenters_rules)](https://pypi.org/project/pysegmenters_rules/)

Rule based segmenter based on Spacy

## Installation

You can simply `pip install pysegmenters_rules`.

## Developing

### Pre-requesites

You will need to install `flit` (for building the package) and `tox` (for orchestrating testing and documentation building):

```
python3 -m pip install flit tox
```

Clone the repository:

```
git clone https://github.com/oterrier/pysegmenters_rules
```

### Running the test suite

You can run the full test suite against all supported versions of Python (3.8) with:

```
tox
```

### Building the documentation

You can build the HTML documentation with:

```
tox -e docs
```

The built documentation is available at `docs/_build/index.html.
drf-fields-limiting 1.0.0
This package provides utils for Django Rest Framework API views and serializers for limiting fields returned in responses thus limiting size and complexity of database requests.

# DRF fields limiting

![example workflow](https://github.com/innovationinit/drf-fields-limiting/actions/workflows/test-package.yml/badge.svg?branch=main)
[![Coverage Status](https://coveralls.io/repos/github/innovationinit/drf-fields-limiting/badge.svg)](https://coveralls.io/github/innovationinit/drf-fields-limiting)


## About

This package provides utils for Django Rest Framework API views and serializers for limiting fields returned in responses thus limiting size and complexity of database requests.

## Install

```bash
pip install drf-fields-limiting
```

## Usage

Inherit from `LimitedFieldsView` or `LimitedFieldsViewSet` and configure it to enable fields limiting.
View limits fields of serialized object in response with respect to `Fields` HTTP header.

If header is not present or is empty show all fields. Fields limiting works only in GET requests.

LIMITED_FIELDS_CONFIG holds map of field name - operation to perform on queryset (from `fields_limiting.operations`).
It should contains entries for all fields declared in serializer_class.

```python
...
class MySerializer(LimitedFieldsSerializer, serializers.ModelSerializer):
    
    class Meta:
        model = MyModel
        fields = (
            'char_field',
            'int_field',
            'foreign',
        )
    ...

class MyViewSet(LimitedFieldsViewSet, viewsets.ModelViewSet):
    ...
    LIMITED_FIELDS_CONFIG = {
        'char_field': Only('char_field'),
        'int_field': Only('int_field'),
        'foreign': SelectRelated('foreign'),
    }
    serializer_class = MySerializer
    ...
```

All available operations are in `drf_fields_limiting.operations` module.

Example GET query:
```
GET /api/v1/base/my/ HTTP/1.1
Authorization: Token h3r315myt0k3n
Accept: application/json
Content-Type: application/json
Fields: char_field,int_field
```

## License
The DRF complete autocomplete package is licensed under the [FreeBSD
License](https://opensource.org/licenses/BSD-2-Clause).
drf-fancy-permissions 1.0.0
Utilities for defining fine-grained permissions in the Django Rest Framework based API views

# DRF fancy permissions

![example workflow](https://github.com/innovationinit/drf-fancy-permissions/actions/workflows/test-package.yml/badge.svg?branch=main)
[![Coverage Status](https://coveralls.io/repos/github/innovationinit/drf-fancy-permissions/badge.svg)](https://coveralls.io/github/innovationinit/drf-fancy-permissions)


## About

This package provides utilities for defining fine-grained permissions in the Django Rest Framework based API views.

## Install

```bash
pip install drf-fancy-permissions
```

## Usage

Use the fancy_permissions.model_action_permission_factory, fancy_permissions.object_action_permission_factory and
fancy_permissions.parent_object_action_permission_factory functions in order to define authorization rules.

```python
from rest_framework.mixins import (
    CreateModelMixin,
    ListModelMixin,
    RetrieveModelMixin,
    UpdateModelMixin,
)
from rest_framework.viewsets import ViewSet

from fancy_permissions import (
    model_action_permission_factory,
    object_action_permission_factory,
    parent_object_action_permission_factory,
)


class SomeViewSet(
    CreateModelMixin,
    RetrieveModelMixin,
    UpdateModelMixin,
    ListModelMixin,
    ViewSet,
):
    serializer_class = SomeModelSerializer
    permission_classes = [
        model_action_permission_factory(
            create=['some_app.add_somemodel'],
            retrieve=None,  # open for all users
            partial_update=['some_app.change_somemodel'],
            list=None,  # open for all users,
        ),
        object_action_permission_factory(
            create=None,
            retrieve=None,
            partial_update=[lambda obj, user: obj.status == 'SOME_STATUS' and not obj.has_something_meaningful()],
            list=None,
            close=None,
        ),
        parent_object_action_permission_factory(
            create=[lambda obj, user: obj.can_create_children()],
            retrieve=None,
            partial_update=[lambda obj, user: obj.can_update_children()],
            list=None,
            close=None,
        ),
    ]
    queryset = SomeModel.objects.all()
```

## License
The Django Wicked Historian package is licensed under the [FreeBSD
License](https://opensource.org/licenses/BSD-2-Clause).