semvec/pypi-packages huggingface dataset:
pydantic-python-regex-validator 0.3.4
A regex validator for pydantic, using python regex.
Requires Python: >=3.8,<4.0

# A regex parser for Pydantic, using pythons regex validator.

Since pydantic V2, pydantics regex validator has some limitations. It cannot do look arounds.
There is some documenation on how to get around this. This package simplifies things for developers

We provide the class, Regex, which can be used.

## Usage in Pydantic

To use simply do:

 
```python
from pydantic_python_regex_validator import Regex
from pydantic import BaseModel
from typing import Annotated

class MyModel(BaseModel):
    my_field: Annotated[str, Regex(r'^foo')]
```

This will then have field, `my_field`, which will have the regex constraint `^foo`

## Usage in FastAPI

This can also be used with fastapi.
```python
from pydantic_python_regex_validator import RegexQuery, RegexBody
from fastapi import FastAPI

app = FastAPI()

@app.get("/test")
async def get_endpoint(my_param: RegexQuery("^foo")):
    return my_param

@app.post("/test")
async def post_endpoint(my_param: RegexBody("^foo")):
    return my_param
```

This then has an endpoint at `/test` which takes a param, `my_param`, which has the regex constraint `^foo`
shinami-python-sdk 0.2.0
This library provides easy access to Shinami APIs.
Requires Python: >=3.11,<4.0

# Shinami Python SDK

This package is an asynchronous API wrapper for the [Shinami In-App Wallet (IAW) API](https://docs.shinami.com/reference/in-app-wallet-api).

Currently, this SDK supports the IAW methods below.

* shinami_key_createSession
* shinami_wal_createWallet
* shinami_wal_executeGaslessTransactionBlock
* shinami_wal_getWallet

## How to Install

```
pip install shinami-python-sdk
```

## How to Use

```
import asyncio
import os

from shinami_python_sdk.iaw import ShinamiIawClient

# Set Shinami API key.
SHINAMI_IAW_API_TOKEN = os.environ["SHINAMI_IAW_API_KEY"]

# Initialize IAW API client.
shinami_iaw_client = ShinamiIawClient(SHINAMI_IAW_API_KEY)

# Create a session_token.
session_token = asyncio.run(shinami_iaw_client.create_session("NOT_A_SECURE_SECRET"))

# Create a wallet.
wallet = asyncio.run(shinami_iaw_client.create_wallet("walletid123", session_token))
```
swagern 0.1
A command-line tool for generating Tavern test cases from Swagger API specifications.

# Swagern

Swagern is a command-line tool that automates the process of generating API test cases from a given Swagger or other API specification files. It leverages the power of fuzzy logic to match user-defined test case descriptions with the corresponding API endpoints defined in the specification file. The output is a set of Tavern YAML files that can be directly used to run API tests.

## Features

- **Fuzzy Matching**: Swagern automatically maps user-defined test cases to API endpoints using fuzzy logic, allowing for more flexible test case definitions.
- **Customizable Output**: Specify output directories or use the default location.
- **Integration with Various API Specifications**: While initially built for Swagger files, Swagern aims to support various API specifications.
- **Environment Variable Mapping**: Use a mapper file to define and load environment variables into your tests.

## Installation

Install Swagern using pip:

```bash
pip install swagern
```
## Options

### `--input`
Path to input test cases in YAML format. This is a required parameter.

### `--output`
Path to the output directory where the Tavern test files will be generated. This is an optional parameter, and the default location is the `tests` directory in the current working directory.

### `--mapper`
Path to the mapper YAML file, used for defining and loading environment variables into your tests. 

### `--api-spec`
Path to the Swagger or other API specifications file. This is an optional parameter. If not provided, Swagern will look for a default file path.

## Usage

Use the `generate` command to create Tavern YAML files based on your input file and specifications:

```bash
swagern generate --input path/to/test_cases.yaml --output path/to/output-dir --mapper path/to/mapper-file --api-spec path/to/swagger.json
```