semvec/pypi-packages huggingface dataset:
ezsession 0.0.16
A small useful Python module to abstract away the common auth header methods used by different software vendors. The output is a requests session with the authentication headers built in.

[![GitHub](https://img.shields.io/badge/GitHub-Sponsor%20Josh%20XT-blue?logo=github&style=plastic)](https://github.com/sponsors/Josh-XT) [![PayPal](https://img.shields.io/badge/PayPal-Sponsor%20Josh%20XT-blue.svg?logo=paypal&style=plastic)](https://paypal.me/joshxt) [![Ko-Fi](https://img.shields.io/badge/Kofi-Sponsor%20Josh%20XT-blue.svg?logo=kofi&style=plastic)](https://ko-fi.com/joshxt)

# ezsession
A small useful Python module to abstract away the common auth header methods used by different software vendors.  The output is a requests session with the authentication headers built in.

```
pip install ezsession
```

## Auth Types and Required Inputs

1. **oauth** - `auth_uri`, `client_id`, `client_secret`, `audience`
2. **oauth_basic** - `auth_uri`, `username`, `password`
3. **oauth_password** - `auth_uri`, `username`, `password`
4. **basic** - `username`, `password`, `auth_uri` (optional)
5. **bearer** - `api_key`
6. **ApiToken** - `api_key`
7. **dell** - `auth_uri`, `client_id`, `client_secret`

## Examples
Example usage for getting a Datto RMM session:

```python
from ezsession import get_session
def datto_rmm_session(api_key, api_secret, server):
    base_uri = f"https://{server}-api.centrastage.net"
    auth = {
        "type": "oauth_basic",
        "auth_uri": f"{base_uri}/auth/oauth/token",
        "username": api_key,
        "password": api_secret,
        "server": server,
    }
    return get_session(auth), base_uri
```

Example to initialize a Datto RMM session then get account variables.

```python
drmm_user = "Your Datto RMM API Key"
drmm_pass = "Your Datto RMM API Secret"
drmm_server = "merlot" # Change to your Datto RMM server.
session, base_uri = datto_rmm_auth(drmm_user, drmm_pass, drmm_server)
response = session.get(f"{base_uri}/api/v2/account/variables")
variables = response.json()["variables"]
```
no-dm-discord 0.1.0
A Discord bot that ensures DMs are always turned off in your Discord
Requires Python: >=3.6

# No-DM Discord Bot

## Introduction

This Python package is designed for interacting with the Discord API to enable or disable direct messaging (DM) on a Discord server. It utilizes environment variables for secure and flexible configuration.

## Installation

To install and use this package, follow these steps:

1. Clone the repository:
   ```bash
   git clone [your-repository-url]
   ```
2. Navigate to the cloned directory:
   ```bash
   cd no-dm-discord
   ```
3. Install required dependencies:
   ```bash
   pip install -r requirements.txt
   ```

## Configuration

Before running the script, you need to set up the following environment variables in a `.env` file:

- `DISCORD_BOT_TOKEN`: Your Discord bot token.
- `DISCORD_GUILD_ID`: The Guild ID of your Discord server.

Example `.env` file:

```
DISCORD_BOT_TOKEN=your_bot_token
DISCORD_GUILD_ID=your_guild_id
```

## Usage

Run the script using Python:

```python
python main.py
```

## Getting a Bot Token

To obtain a bot token:

1. Visit the [Discord Developer Portal](https://discord.com/developers/applications).
2. Create a new application and add a bot to it.
3. Copy the bot token provided.

## Setting Up the Bot

Ensure your bot has administrative permissions on the Discord server for it to function correctly.

## Getting the Guild ID

To find your Discord server's Guild ID:

1. Enable Developer Mode in Discord (Settings -> Advanced -> Developer Mode).
2. Right-click your server name and click 'Copy ID'.

## Contributing

Contributions to this package are welcome. Please follow these steps to contribute:

1. Fork the repository.
2. Create a new branch for your feature.
3. Commit your changes.
4. Push to the branch.
5. Open a pull request.

## Code Sample

Below is a simple example of how to use this package within your Python project to disable DMs for your Discord server:

```python
from no_dm_discord import update_discord_status

# Ensure your .env file has the DISCORD_BOT_TOKEN and DISCORD_GUILD_ID set
update_discord_status()

print("DMs have been successfully disabled.")
```

This example assumes you have set up your environment variables correctly and have the `no_dm_discord` package installed in your environment.

Remember, the actual function call and package import might need to be adjusted based on your package structure and function definitions.

## License

This project is licensed under the MIT License - see the `LICENSE` file for details.
ionic-haystack 0.1.6
Ionic Commerce tool for Haystack
Requires Python: >=3.8,<4.0

# Ionic Commerce tool for Haystack

Ionic Haystack provides an Agent Tool integration to Ionic Commerce. This tool will enable e-commerce for your agent , allowing your users to ask for product recommendations and purchase products through the agent chat interface.

## Installation

You can install the package from PyPI using `pip`:
```sh
python3 -m pip install ionic-haystack
```

or `poetry`:

```sh
poetry add ionic-haystack
```

## Usage
Get started quickly using Ionic Commerce with Haystack by creating an IonicShoppingTool and adding it to your agent's tools.
```python
import os
from haystack.agents import Tool
from haystack.agents.conversational import ConversationalAgent
from haystack.agents.memory import ConversationMemory
from haystack.nodes import PromptNode

from ionic_haystack.prompt_templates import ionic_template
from ionic_haystack.tool import IonicShoppingTool

ionic_node = IonicShoppingTool(api_key="my_ionic_api_key")
ionic_tool = Tool(
    name="Ionic",
    pipeline_or_node=ionic_node,
    description=ionic_template
)

memory = ConversationMemory()
prompt_node = PromptNode("gpt-3.5-turbo", api_key=os.getenv("OPENAI_API_KEY") , max_length=256, stop_words=["Observation:"])
agent = ConversationalAgent(prompt_node, tools=[ionic_tool],  memory=memory, prompt_template="deepset/conversational-agent")
```

## Examples
- Example Ionic Agent: [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/ioniccommerce/ionic_haystack/blob/main/examples/example_ionic_agent.ipynb)
textmidiformedit 1.0.69
A python package for editing forms used by textmidicgm, "Text MIDI Computer-Generated Music".
Requires Python: >=3.9

# textmidiformedit package

This is the package for textmidiformedit.py.
textmidiformedit.py is a python program with supporting modules
for editing forms that are used by textmidicgm, the
textmidi Computer-generated music program.