semvec/pypi-packages huggingface dataset:
xpipe_client 0.1.26
Client for the XPipe API
License: MIT
Requires Python: <4.0,>=3.10

# xpipe_client
[![GitHub license](https://img.shields.io/github/license/coandco/python_xpipe_client.svg)](https://github.com/coandco/python_xpipe_client/blob/master/LICENSE)
[![PyPI version](https://img.shields.io/pypi/v/xpipe_client)](https://pypi.org/project/xpipe_client/)

Python client for the XPipe API


## Installation
```
python3 -m pip install xpipe_client
```

## Usage

```python
from xpipe_client import Client

# By default, Client() will read the API key from xpipe_auth on the local filesystem
# and talk to the XPipe API on localhost.  To connect to a remote instance with an API
# key, use Client(token="foo", base_url = "http://servername:21723")
client = Client()

# connection_query accepts glob-based filters on the category, connection name, and connection type
all_connections = client.connection_query()

# Each connection includes uuid, category, connection, and type information
first_connection_uuid = all_connections[0]["uuid"]

# Before any shell commands can be run, a shell session must be started on a connection
client.shell_start(first_connection_uuid)

# Prints {'exitCode': 0, 'stdout': 'hello world', 'stderr': ''}
print(client.shell_exec(first_connection_uuid, "echo hello world"))

# Clean up after ourselves
client.shell_stop(first_connection_uuid)
```

There's also an async version of the client that can be accessed as AsyncClient:
```python
import asyncio
from xpipe_client import AsyncClient


async def main():
    # By default, AsyncClient() will read the API key from xpipe_auth on the local filesystem
    # and talk to the XPipe API on localhost.  To connect to a remote instance with an API
    # key, use Client(token="foo", base_url = "http://servername:21723")
    client = AsyncClient()

    # connection_query accepts glob-based filters on the category, connection name, and connection type
    all_connections = await client.connection_query()
    
    # Each connection includes uuid, category, connection, and type information
    first_connection_uuid = all_connections[0]["uuid"]
    
    # Before any shell commands can be run, a shell session must be started on a connection
    await client.shell_start(first_connection_uuid)
    
    # Prints {'exitCode': 0, 'stdout': 'hello world', 'stderr': ''}
    print(await client.shell_exec(first_connection_uuid, "echo hello world"))
    
    # Clean up after ourselves
    await client.shell_stop(first_connection_uuid)


if __name__ == "__main__":
    asyncio.run(main())
```

## Tests
To run the test suite, you'll need to define the XPIPE_APIKEY env var.  This will allow the two "log in with the ApiKey 
rather than Local method" tests to work.  Here's the recommended method for running the tests with poetry:
```commandline
cd /path/to/python_xpipe_client
poetry install
XPIPE_APIKEY=<api_key> poetry run pytest
```
flamel-orm 0.0.5
A simple declarative ORM for SQLite
License: MIT
Requires Python: >=3.8
Keywords: ORM, simple

<p align="center">
   <img src="logo/logo_flamel.jpeg" alt="Flamel Logo" width="200"/>
</p>

<p align="center">
    <a src="https://pypi.org/project/flamel-orm">
        <img alt="python version" src="https://img.shields.io/pypi/pyversions/flamel-orm.svg" />
    </a>
    <img alt="CI" src="https://github.com/fernando24164/flamel/actions/workflows/python-test.yml/badge.svg">
</p>

# Table of Contents

* [Description](#description)
* [Installation](#installation)
* [Usage](#usage)
* [License](#license)


## ➤ Description

A declarative ORM from scratch, compatible with SQLite

## ➤ Installation

Use the package manager [pip](https://pip.pypa.io/en/stable/) to install flamel.

```bash
pip install flamel-orm
```

## 📚 Usage

```python
from flamel.base import Base
from flamel.column import Column, Integer, String


class Worker(Base):
    id = Column("id", Integer, primary_key=True, autoincrement=True)
    name = Column("name", String, nullable=False, unique=True)
    email = Column("mail", String, nullable=False, unique=True)


Base.set_engine("company.db")

Base.create_tables()

worker = Worker(name='John Doe', email='john.doe@example.com')
worker2 = Worker(name='Jane Smith', email='jane.smith@example.com')
worker3 = Worker(name='Mike Johnson', email='mike.johnson@example.com')

Base.insert(worker)
Base.insert(worker2)
Base.insert(worker3)

query = Worker.query().select().filter(name="John Doe")
print(query)
result = query.execute()
print(result)

Base.engine_close()
```

## ➤ Roadmap

- [x] MVP of the ORM
- [x] Implement a way to insert data
- [x] Implement group_by
- [x] Implement having

## ➤ Credits

This project is thanks to other projects and people:

- [SQLAlchemy architecture](https://aosabook.org/en/v2/sqlalchemy.html) -

- [SQLAlchemy github](https://github.com/sqlalchemy/sqlalchemy) -

## ➤ License

Licensed under [MIT](https://opensource.org/licenses/MIT).