semvec/pypi-packages huggingface dataset:
fstatemachine 1.1.0
Python finite state machine
License: MIT
Requires Python: >=3.6

Python finite state machine package
===================================

|pypi| |ci| |coverage| |docs|

Simple finite state machine implementation written in Python

Online documentation is at https://fstatemachine.readthedocs.io/.

Bugs can be reported to https://github.com/yakimka/fstatemachine. The code can also
be found there.

.. |ci| image:: https://github.com/yakimka/fstatemachine/workflows/Run%20linters,%20tests%20and%20upload%20to%20pypi/badge.svg
    :target: https://github.com/yakimka/fstatemachine/actions
.. |coverage| image:: https://codecov.io/gh/yakimka/fstatemachine/branch/master/graph/badge.svg?token=5YNW56XJQT
    :target: https://codecov.io/gh/yakimka/fstatemachine
.. |docs| image:: https://readthedocs.org/projects/fstatemachine/badge/?version=latest
    :target: https://fstatemachine.readthedocs.io/en/latest/?badge=latest
    :alt: Documentation Status
.. |pypi| image:: https://img.shields.io/pypi/v/fstatemachine.svg
   :target: https://pypi.org/project/fstatemachine/
   :alt: fstatemachine on PyPI
pydactory 0.2.0
A factory library for pydantic models.
License: MIT
Requires Python: >=3.8,<4.0
Keywords: factory,fixture,pydantic

# `pydactory`

`pydactory` is a factory library for [`pydantic`](https://github.com/samuelcolvin/pydantic/) models with an API inspired by [`factory_boy`](https://github.com/FactoryBoy/factory_boy).

## Installation

PyPI: https://pypi.org/project/pydactory/

`pip install pydactory`

## Features

`pydactory` is...

**low boilerplate**: provides default values for many common types. You don't need to tell `pydactory` how to build your `name: str` fields

**familiar**: define your factories like you define your `pydantic` models: in a simple, declarative syntax

## Getting started

### Declare your `pydantic` models

```python
from datetime import datetime
from typing import Optional

from pydantic import BaseModel, Field


class Address(BaseModel):
    street1: str
    street2: str
    city: str
    state: str
    zip_code: str = Field(max_length=5)


class Author(BaseModel):
    name: str
    address: Address
    date_of_birth: datetime


class Book(BaseModel):
    title: str = Field(alias="Title")
    author: Author = Field(alias="Author")
    pages: int = Field(alias="PageCount")
    publish_date: datetime = Field(alias="PublishDate")
    isbn_13: str = Field(alias="ISBN-13")
    isbn_10: Optional[str] = Field(alias="ISBN-10")
```

### Declare your factories

```python
from pydactory import Factory


class AuthorFactory(Factory[Author]):
    name = "Leo Tolstoy"


class BookFactory(Factory[Book]):
    title = "War and Peace"
    author = AuthorFactory
    publish_date = datetime.today
```

### Use the factories to build your models

```python
def test_book_factory():
    book: Book = BookFactory.build(title="Anna Karenina")
    assert Book(
        title="Anna Karenina",
        author=Author(
            name="Leo Tolstoy",
            address=Address(
                street1="fake", street2="fake", city="fake", state="fake", zip_code="fake"
            ),
            date_of_birth=datetime.datetime(2000, 1, 1, 0, 0),
        ),
        pages=1,
        publish_date=datetime.datetime(2021, 3, 26, 14, 15, 22, 613309),
        isbn_13="fake",
        isbn_10=None,
    ) == book
```

## Roadmap

`pydactory` is still very much in progress.
laika-lib 1.4.0
A simple business reporting library
License: MIT
Keywords: report reporting etl sql s3 drive ftp adwords


# Laika

![laika_stamp](http://3.bp.blogspot.com/_r7sReQYd6vU/R_eomB1FWfI/AAAAAAAAAVM/PBKP7ng7KVA/s400/Romania_Laika.jpg)

*laika* is a business reporting library that allows you to request data from different sources and send it to someone or save it at some destination. For example: you can query your database, send the result as an excel attachment via email and save it on Google Drive or Amazon S3.

Check out the documentation at [readthedocs](http://laika.readthedocs.io/en/latest/index.html).

<!-- TODO: document what it is and what it is not -->

Laika was tested on Python 2.7 and 3.5 or higher.

## Installation

You can install it directly using `pip`:

```bash
$ pip install laika-lib
```

You can specify extra dependencies. To find out what dependencies you need to install, check out reports and results documentation. For example, to install libraries to use Google Drive and Amazon S3 in your reports you must run:

```bash
$ pip install laika-lib[drive, s3]
```

## Usage

`laika.py` is a script that lets you use laika library. You can run it like this:

```bash
$ laika.py some_report
```

This command will run the report named *some_report*. This report must be defined in some configuration file. By default laika looks for `config.json` in the same directory. You can specify a custom config passing `-c` parameter:

```bash
$ laika.py -c my_config.json
```

Path to configuration file can also be specified with the `LAIKA_CONFIG_FILE_PATH` environment variable:

```bash
$ export LAIKA_CONFIG_FILE_PATH='/home/me/my_config.json'
$ laika.py my_report
```

Another parameter you can use is `--pwd` which serves for specifying working directory. It can also be specified in configuration file or `LAIKA_PWD` environment variable.

### Arguments

You can check all the predefined `laika.py` arguments with `--help`.

Undefined arguments will be added to report's definition overwriting default values. Thus, if for example the configuration for `my_report` defines field `my_field` with value `foo`, if you execute it like this:

```bash
$ laika.py my_report --my_field bar
```

`my_field` configuration will contain `bar` as value.


## Testing

To run test, you must install test dependencies:

```bash
$ pip install laika-lib[test]
```

Then, run test from laika directory:

```bash
$ cd path/to/laika
$ python -m unittest discover
```
divsufsort 1.0.1
Python bindings for libdivsufsort
License: MIT

# divsufsort-python

Python bindings for [libdivsufsort][1].

  [1]: https://github.com/y-256/libdivsufsort

## Getting Started

Install from pip.

```
pip install divsufsort
```

Import the module and call its `divsufsort` function.

```python
>>> from divsufsort import divsufsort
>>> divsufsort(b'The quick brown fox jumps over the lazy dog')
(9, 39, 15, 19, 34, 25, 3, 30, 0, 36, 10, 7, 40, 33, 2, 28, 16, 42, 32, 1, 6,
20, 8, 35, 22, 14, 41, 26, 12, 17, 23, 4, 29, 11, 24, 31, 5, 21, 27, 13, 18,
38, 37)
```

The function receives a bytes-like object, `b`, and returns the corresponding
suffix-array, that is a tuple of integers `r` such that `len(r) == len(b)` and
`b[r[i]:] < b[r[i+1]:]` for all `i`.
afkarena 0.2.0
Simple API wrapper for the AFK Arena site https://cdkey.lilith.com/afk-global.
License: MIT
Requires Python: >=3.9,<4.0
Keywords: afk,arena,afkarena,gift,giftcode

# AFK Arena API.

Simple API wrapper for the AFK Arena site https://cdkey.lilith.com/afk-global.

> **Note:** This wrapper is unofficial and is not associated with nor endorsed by Lilith Games.

The logic of this library has been part of my Discord bot, [Dreaf](https://github.com/scragly/Dreaf), ever since AFK Arena changed to the external gift code redemption site. Due to the increased interest of community members on making use of this unofficial API, and the fact that this logic is currently being used across two seperate projects of my own, I figured it's time to make the API interactions standalone to ease maintenance and keep the feature scope focused on the essentials of its functionality.

## Install

```
pip install afkarena
```

## Requirements

- Python 3.9+
- aiohttp 3.7+

## How to use

```python
# create a Player object for the main user account.
player = Player(main_user_id)

# authenticate using the authentication code in game settings.
await player.verify(authentication_code)

# fetch data of all linked user accounts
await player.fetch_users()

# redeem one or more gift codes for all linked user accounts
results = await player.redeem_codes(gift_code_one, gift_code_two)

# view code redemption results
print(results)
```
pytest-qasync 0.0.1
Pytest support for qasync.
License: MIT
Requires Python: >= 3.9

# pytest-qasync

Pytest plugin to test [qasync](https://pypi.org/project/qasync/).

## Example

```
import pytest

async def coro():
    return 1

@pytest.mark.qasync
async def test_qasync():
    res = await coro()
    assert res == 1
```

## Disclaimer

Code mostly stolen from [pytest-asyncio](https://pypi.org/project/pytest-asyncio) project.