semvec/pypi-packages huggingface dataset:
allocation-language 0.0.4
Language intented to construct the financial behaviour of (re)insurance contracts.
Requires Python: >=3.6

# allocation_language
Language intented to construct the financial behaviour of (re)insurance contracts. 
Complete documentation of all methods is still pending because this is still in development.

## Installation

> $ pip install allocation_language

## Examples

``` python
import random
from allocation_language import make_contract
from allocation_language.alloc_lang_data_containers import converters

contract = make_contract.make_contract_from_text("alloc @'claim' $name_1 @'liable';")
contract.update('name_1', 50)
def loss_data():
    for i in range(10):
        yield {
            'id': i,
            'claim': random.randint(1, 1e3),
            'liable': 0,
        }

losses = converters.dict_iter_to_event_iter(loss_data())
results = contract.evaluate_stream(losses)

for x in results:
    print(x)
```
The above code is an example to feed a generator of loss data into a contract. 
The "alloc @'claim' $name_1 @'liable';" command translates in english to 'move as much as possible, limited to name_1's value, from the claim field into the liable field'.
This means it applies an occurence limit equal to name_1.
The contract.update method allows modification of any named variables in a contract. There can be multiple.
drf_lighten 0.8.1
A way to remove unwanted fields from a serializer

# DRF Lighten
[![PyPI version](https://badge.fury.io/py/drf_lighten.svg)](https://badge.fury.io/py/drf_lighten)
[![Maintainability](https://api.codeclimate.com/v1/badges/fb7592cf34907b7cb8d8/maintainability)](https://codeclimate.com/github/jupi2142/drf_lighten/maintainability)
![python3.x](https://img.shields.io/badge/python-3.x-brightgreen.svg)
![python2.x](https://img.shields.io/badge/python-2.x-brightgreen.svg)

## Purpose
Even if we call the same end point at multiple places, the information we want
from the response varies greatly. DRF Lighten makes it possible to specify and
get only the data you want.


## Installation
`pip install drf_lighten`


## Usage
```python
# serializers.py
from app import models
from drf_lighten.serializers import DynamicFieldsMixin
from rest_framework import serializers


class UserSerializer(DynamicFieldsMixin,
                     serializers.HyperlinkedModelSerializer)
    class Meta:
        model = models.User
        fields = "__all__"



class ProfileSerializer(DynamicFieldsMixin,
                        serializers.HyperlinkedModelSerializer)
    user = UserSerializer(read_only=True)

    class Meta:
        model = models.Profile
        fields = "__all__"


# views.py
from app import models
from drf_lighten.views import DynamicFieldsMixin
from rest_framework import viewsets


# …

class ProfileViewSet(DynamicFieldsMixin, viewsets.ModelViewSet):
    queryset = models.Profile.objects.all()
    serializer_class = serializers.ProfileSerializer

```

## Examples
`https://localhost:8000/profiles/`
```json
[
  {
    "url": "https://localhost:8000/profiles/22/",
    "picture": "https://localhost:8000/media/22.jpg",
    "phone_number": "+251-911-11-11-11",
    "user": {
      "url": "https://localhost:8000/users/22/",
      "user_name": "jupi2142",
      "email": "test@gmail.com",
      "first_name": "Henock",
      "last_name": "Tesfaye"
    },
    "posts": [
      "https://localhost:8000/posts/77/",
      "https://localhost:8000/posts/78/",
      "https://localhost:8000/posts/79/",
      "https://localhost:8000/posts/79/",
      "https://localhost:8000/posts/99/"
    ]
  }
]
```

`https://localhost:8000/profiles/?fields=["url", "picture", {"user": ["url", "username"]}]`
```json
[
  {
    "url": "https://localhost:8000/profiles/22/",
    "picture": "https://localhost:8000/media/22.jpg",
    "user": {
      "url": "https://localhost:8000/users/22/",
      "user_name": "jupi2142"
    }
  }
]
```


## Configuration
If you want to use different query params than the ones provided, you can go to your django project's settings and do that

```python
DRF_LIGHTEN_INCLUDE = 'fields'
DRF_LIGHTEN_EXCLUDE = 'exclude'
```
iron-core 1.2.1
Universal classes and methods for Iron.io API wrappers to build on.
Keywords: Iron.io

Iron.io common library
----------------------

This package offers common functions for Iron.io APIs and services. It does not wrap 
any APIs or contain API-specific features, but serves as a common base that wrappers
may be built on. Users looking for API wrappers should instead look at 
iron_worker_python and iron_worker_mq.
cookie-sync 0.0.1
Sync cookies between Chrome

# cookie-sync

## About

This is a simple extension that allows you to sync cookies between Chrome and Python using the [websocket](https://en.wikipedia.org/wiki/WebSocket) protocol.

## Requirements

- Python >= 3.7
- [aiohttp](https://docs.aiohttp.org/en/stable)

## Usage

1. `pip install cookie-sync`

2. Download the and unarchive the extension from [releases](https://github.com/sunney-x/cookie-sync/releases)

3. Set `host_permissions` for the target website in `manifest.json` 

4. Load the extension in Chrome
   - Go to `chrome://extensions`
   - Click `Load unpacked` and locate the extension folder

5. Quickstart example
```python
import aiohttp
from cookie_sync import run_server

session = aiohttp.ClientSession()

run_server(
    session=session,
    domain='https://google.com'
)
```

## Documentation

### **run_server** configuration options

```py
session: aiohttp.ClientSession
    - 'The session to keep cookies synced on'

domain: str
    - 'The domain to sync cookies for'

cookies: Optional[list] # Default []
    - 'List of cookies to sync, if empty, all cookies will be synced'

wait_for_cookies: Optional[bool] # Default True
    - 'If `False`, will not wait for the cookies to be synced'

timeout: Optional[int] # Default 30
    - 'Timeout in seconds to wait for `wait_for_cookies`'
```