semvec/pypi-packages huggingface dataset:
CipherModule 1.4
A python module to use ciphers easily

# Cipher Module

Have you ever wanted to use ciphers in **python**?
If you have, you know that it's really hard to make functions for your cipher of choice,

**So that's why I made this module!**
You can use this module to simplify your ciphering process!
# Ciphers

This module, supports following ciphers (Note: other ciphers will be added to the module):
- Caeser
- Atbash
- Vigenere
- Base64
- A1Z26

# How to use

Every cipher, has a ``encode`` and ``decode`` function.

Most of them, take the argument `text` or `code`, but some of them, take more argument, like **Vigenere** which takes a `key` argument
wafec.oslo.messaging 12.4.0
Oslo Messaging API
Requires Python: >=3.6

========================
Team and repository tags
========================

.. image:: https://governance.openstack.org/tc/badges/oslo.messaging.svg
    :target: https://governance.openstack.org/tc/reference/tags/index.html

.. Change things from this point on

Oslo Messaging Library
======================

.. image:: https://img.shields.io/pypi/v/oslo.messaging.svg
    :target: https://pypi.org/project/oslo.messaging/
    :alt: Latest Version

.. image:: https://img.shields.io/pypi/dm/oslo.messaging.svg
    :target: https://pypi.org/project/oslo.messaging/
    :alt: Downloads

The Oslo messaging API supports RPC and notifications over a number of
different messaging transports.

* License: Apache License, Version 2.0
* Documentation: https://docs.openstack.org/oslo.messaging/latest/
* Source: https://opendev.org/openstack/oslo.messaging
* Bugs: https://bugs.launchpad.net/oslo.messaging
* Release notes: https://docs.openstack.org/releasenotes/oslo.messaging/
shandlers 0.0.3
A python lib that provides handlers for serverless events
Keywords: python aws serverless

# shandlers

[![serverless](http://public.serverless.com/badges/v3.svg)](http://www.serverless.com)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
[![Build Status](https://travis-ci.com/GonzaloSaad/shandlers.svg?branch=master)](https://travis-ci.com/GonzaloSaad/shandlers)

A python lib that provides handlers for serverless events

&nbsp;
## Installation

From PyPI:

    shandlers==0.0.3

&nbsp;
## Supported events
- [x] sqs
- [ ] apigw
- [ ] sns
- [ ] kinesis stream
- [ ] kinesis firehose


&nbsp;
## Basic Usage

### SQS Handler

Create a function that accepts a `payload` and `kwargs` as parameters, that contains the logic
that you want to apply to **each** of your records in the event.

```python
def handle(payload, **kwargs):
    pass
```

Add the `@sqs_handler` decorator to the function

```python
from shandlers.sqs.handler import sqs_handler

@sqs_handler()
def handle(payload, **kwargs):
    pass
```

The decorator will allow your function to:
- Parse the SQS event (using [`marshmallow`](https://github.com/marshmallow-code/marshmallow))
- Parse the `body` of each record to a `dict` and pass it to your function
- Handle a basic retry logic
- Handle `ValidationError` and `JSONDecodeError`

&nbsp;
#### The kwargs argument in your function

You can have extra arguemtns in your function if you need to. The `sqs_handler` decorator
also passes `receive_count` and `event` as parameters, in case you need to perform
extra actions with that information.

```python
from shandlers.sqs.handler import sqs_handler

@sqs_handler()
def handle(payload, receive_count, event, **kwargs):
    pass
```

&nbsp;
#### Configuring the decorator

#### Schema

You can add `schema` to the decorator parameters, in case you have for example
a `marshmallow` schema or if you have any other mechanism to parse that responds to
the `.loads(json_string)` call.

```python
from shandlers.sqs.handler import sqs_handler
from myschema import MyMarshmallowSchema

@sqs_handler(schema=MyMarshmallowSchema())
def handle(payload, **kwargs):
    pass
```

Here the `payload` argument type will depend on the passed schema output.

Also, if while parsing the record `body` a parsing error occurs, the event
will be **DISCARDED**.

> The default value of `schema` is the `json` module from python

#### Retry threshold

You can add `retry_theshold` to the decorator parameters to specify the
amount of times a `record` can retry to be processed.

```python
from shandlers.sqs.handler import sqs_handler

@sqs_handler(retry_threshold=5)
def handle(payload, **kwargs):
    pass
```

> The default value is set to `1`

#### Logger

You can add `logger` to the decorator parameter, so the handlers uses your logger
when an error occurs.

```python
from shandlers.sqs.handler import sqs_handler
import logging

_LOGGER = logging.getLogger()

@sqs_handler(logger=_LOGGER)
def handle(payload, **kwargs):
    pass
```

> The default logger can be checked [here](shandlers/logger.py)
byarse 1.2.0
Serialize Arguments as Bytes!
Requires Python: >=3

# Bytes Argument Serializer

## BAS Object
```python
from byarse import BAS


bas = BAS(
	safe=True, # Enable/disable safe mode. Safe mode prevents Pickle objects from being deserialized! (enabled by default)
)
```

## Serialize
```python
serialized = bas.s([
	'Hello, world!', # string
	b'Hello, world!', # bytes
	42, # int
	2.5, # float
	datetime.datetime.utcnow(), # datetime
]) # b'...'
```

## Deserialize
```python
data = bas.u(
	serialized
)
```

## Pickle
You can have anything Pickleable be pickled and unpickled automatically by Byarse.
Pickle can be potentially dangerous, so try not to avoid it, or sign and verify all serializations with something like HMAC!
Safe mode must be set to `False` for pickled objects to be deserialized.

```python
class Test:
	a = 1

serialized bas.s([
	Pickle(Test)
]) # b'...'

self.safe = False

bas.u(serialized) # <class 'Test'>

self.safe = True

bas.u(serialized) # raises TypeError
```

## Example Program

```python
import os, datetime
from byarse import Pickle
from byarse import BAS


bas = BAS(safe=True) # Serializer/Deserializer


class Test: # Test class (for pickling)
    randomdata = os.urandom(16)


i = input("Read or write? (r/w)\n")


if i.lower().startswith('w'): # 'w'
    # ----
    # Serialize
    # ----
    with open('test', 'wb') as f:
        f.write(bas.s([
            'Hello, world!',
            b'Hello, world!',
            42,
            2.5,
            datetime.datetime.utcnow(),
            # Pickle(Test) # Will raise TypeError when read if safe mode is enabled.
        ]))
else: # 'r'
    # ----
    # Deserialize
    # ----
    with open('test', 'rb') as f:
        ua = bas.u(f.read()) # Unserialize

        for i in ua:
            print(type(i).__name__, ':', i) # Output: "type : argument" (ex. str : Hello, world!)
```