semvec/pypi-packages huggingface dataset:
carefree-client 0.1.10
Client framework based on FastAPI
Keywords: python carefree-learn PyTorch

`carefree-client` is a client framework based on `FastAPI`. It also supports interacting with Triton Inference Server.


# pip


## Install

```bash
pip install -e .
```


## Run

```bash
uvicorn apis.interface:app --host 0.0.0.0 --port 8123
```


# Docker


## Build

```bash
docker build -t cfclient .
```

If your internet environment lands in China, it might be faster to build with `Dockerfile.cn`:

```bash
docker build -t cfclient -f Dockerfile.cn .
```


## Run

```bash
docker run --rm -p 8123:8123 -v /full/path/to/your/client/logs:/carefree-client/apis/logs cfclient:latest
```

or

```bash
docker run --rm --link image_name_of_your_triton_server -p 8123:8123 -v /full/path/to/your/client/logs:/carefree-client/apis/logs cfclient:latest
```

In this case, you need to modify the `apis/interface.py` file as well: you need to modify the `constants` variable (defined at L27) and set the value of `triton_host` (defined at L28) from `None` to `image_name_of_your_triton_server`.
gettestmail 1.0.1
A Python client library for the GetTestMail API
Requires Python: >=3.6

# python-sdk
Python SDK for GetTestMail

This Python client library allows you to interact with the GetTestMail API, which provides a simple way to create temporary email addresses and receive messages sent to them.

To use this library, you will need to have a GetTestMail account. If you don't have one, you can sign up for a free [account](https://gettestmail.com).

## Installation

```bash
pip install gettestmail
```


## Usage

```python
from gettestmail.client import GetTestMailClient

# optional parameters
expires_at = "2023-04-01T00:00:00Z"

client = GetTestMailClient("your-api-key")
test_mail = client.create_new()
print(test_mail.emailAddress)

# This will wait for a message to be received up until expires_at time
test_mail = client.wait_for_message(test_mail.id)
print(test_mail.message)

```

## Models

### GetTestMail

The GetTestMail model represents a disposable email address. It has the following attributes:

* id - The id of the email address
* emailAddress - The email address
* expiresAt - The time at which the email address will expire
* message - The message received by the email address

### Message

The Message received by the email address. It has the following attributes:

* id - The id of the message
* from - The sender of the message
* to - The recipient of the message
* subject - The subject of the message
* text - Text representation of the message
* html - HTML representation of the message
* attachments - List of attachments

### Attachment

The Attachment received by the email address. It has the following attributes:

* filename - The filename of the attachment
* mimeType - The mime type of the attachment
* content - The content of the attachment


## API Documentation

TODO

## License

This project is licensed under the MIT License. See the LICENSE file for details.
datastore-client 0.0.10
A simple Google DataStore client
Requires Python: >=3.6,<4.0

# Simple DataStore Client

A simple Google DataStore client that exposes 3 functions on the `DatastoreClient` class.

```python
class DatastoreClient:
    def __init__(self, namespace: str=None, **kwargs) -> None:
        self.client = Client(namespace=namespace, **kwargs)

    def set_key(
        self,
        entity_name: str,
        key_name: str,
        **properties: Any,
    ) -> None:
        ...

    def get_key(
        self,
        entity_name: str,
        key_name: str,
    ) -> Optional[Entity]:
        ...

    def query_entity(
        self,
        entity_name: str,
        *query_filters: Tuple[str, str, Any],
        projection: List[str]=None,
        limit: Optional[int]=None,
    ) -> Iterator:
        ...
```

## Examples

### Changing the `namespace`
You can set the `namespace` for the client by passing it in to the constructor
```python
from datastore_client.client import DatastoreClient

client = DatastoreClient(namespace='namespace_A')
```

The following will change the namespace for all subsequent function calls.

```python
from datastore_client.client import DatastoreClient

client = DatastoreClient()
client.client.namespace = 'specific_namespace'
```

### `set_key`

```python
from datastore_client.client import DatastoreClient

client = DatastoreClient()
client.set_key(
    entity_name=RECHARGE_NOTES_ENTITY, 
    key_name=note_key, 
    username=username, 
    reference=reference, 
    note=notes,
)

# This can also be used in batch mode
with client.batch_update():
    client.set_key(...)
    client.set_key(...)

# Both key updates will be done when the with block exits
```

### `get_key`

```python
from datastore_client.client import DatastoreClient

client = DatastoreClient()
client.get_key(LOGIN_ENTITY, username)
```

### `query_entity`

```python
from datastore_client.client import DatastoreClient

client = DatastoreClient()
product_list = list(client.query_entity(
    PRODUCT_ENTITY,
    ('network', '=', network_name),
    ('product_type', '=', product_code),
    ('bundle_size', '=', denomination),
    projection=['id'],
    limit=1,
))

print(product_list[0]['id'])
```