semvec/pypi-packages huggingface dataset:
aiosfpubsub 0.0.6
An async Python gRPC client for the Salesforce PubSub API.
Requires Python: >=3.8
Keywords: sf, salesforce, pubsub, pub/sub

# aiosfpubsub
An async Python gRPC client for the Salesforce Pub/Sub API.

https://github.com/forcedotcom/pub-sub-api/blob/main/pubsub_api.proto

# install
```bash
pip install aiosfpubsub
```

# usage 
```python
import asyncio
from aiosfpubsub import Client
from datetime import datetime 


def callback(event, client):
    """
    This is a callback that gets passed to the `Client.subscribe()` method.
    When no events are received within a certain time period, the API's subscribe
    method sends keepalive messages and the latest replay ID through this callback.
    """
    if event.events:
        print("Number of events received in FetchResponse: ", len(event.events))

        for evt in event.events:
            # Get the event payload and schema, then decode the payload
            payload_bytes = evt.event.payload
            json_schema = client.get_schema_json(evt.event.schema_id)
            decoded_event = client.decode(json_schema, payload_bytes)
            print(decoded_event)
    else:
        print(f"[{datetime.now():%Y-%m-%d %H:%M:%S}] The subscription is active.")

async def main():
    client = Client(**{
        "url": "https://login.salesforce.com",
        "username": "myuser",
        "password": "mypass",
        "grpc_host": "api.pubsub.salesforce.com",
        "grpc_port": 7443,
        "api_version": "57.0"
    })
    client.auth()
    await client.subscribe(
        topic="/event/My_Event__e",
        replay_type="EARLIEST",
        replay_id=None,
        num_requested=10,
        callback=callback
    )

if __name__ == "__main__":
    asyncio.run(main())
```
asimplepypackageformmik 4.0
A simple Python package for demonstration purposes
Requires Python: >=3.6
Keywords: example, simple

# Simple Package

A simple Python package for demonstration purposes.

## Installation

```sh
pip install asimplepypackageformmik
```

## Usage

```python
from simple_package import greet

print(greet("World"))  # Output: Hello, World!
```
terminaloptions 1.0.1
Menu for command line
Requires Python: >=3.11

# terminaloptions

Menu for command line applications.

## Installation

```bash
pip install terminaloptions
```

## Usage

```python
from terminaloptions import Menu

options = [
    'Option 1',
    'Option 2',
    'Option 3',
]

menu = Menu(options) # Create a new menu.

# Running menu will print the options and wait for the user to select one.
# Use the arrow keys to navigate and enter to select.

selection = menu.run_menu() # Returns the selected option.
```

Other arguments for `run_menu` method:

- `title`: str | None = None -> Show a title for the menu.
- `get_index`: bool = False -> Return the index of the selected option.
- `help`: bool = True -> Show a short help message at the top of the menu.

## Next features

- <span style="font-family: 'courier new'">[ ]</span> Add support for submenus.
- <span style="font-family: 'courier new'">[ ]</span> Customise the appearance of the menu.
- <span style="font-family: 'courier new'">[ ]</span> Add support for custom key bindings.
- <span style="font-family: 'courier new'">[ ]</span> Add support for custom actions.
- <span style="font-family: 'courier new'">[ ]</span> Add support for custom help messages.