semvec/pypi-packages huggingface dataset:
amgi-paho-mqtt 0.36.0
AMGI MQTT Server
Requires Python: >=3.10

# amgi-paho-mqtt

amgi-paho-mqtt is an [AMGI](https://amgi.readthedocs.io/en/latest/) compatible server to run AMGI applications against
[MQTT](https://mqtt.org/).

## Installation

```
pip install amgi-paho-mqtt==0.36.0
```

## Example

This example uses [AsyncFast](https://pypi.org/project/asyncfast/):

```python
from dataclasses import dataclass

from amgi_paho_mqtt import run
from asyncfast import AsyncFast

app = AsyncFast()


@dataclass
class Order:
    item_ids: list[str]


@app.channel("order-topic")
async def order_topic(order: Order) -> None:
    # Makes an order
    ...


if __name__ == "__main__":
    run(app, "order-topic")
```

Or the application could be run via the commandline:

```commandline
asyncfast run amgi-paho-mqtt main:app order-topic
```

## Contact

For questions or suggestions, please contact [jack.burridge@mail.com](mailto:jack.burridge@mail.com).

## License

Copyright 2025 AMGI
amgi-aiokafka 0.36.0
AMGI Kafka Server
Requires Python: >=3.10

# amgi-aiokafka

amgi-aiokafka is an [AMGI](https://amgi.readthedocs.io/en/latest/) compatible server to run AMGI applications against
[Kafka](https://kafka.apache.org/).

## Installation

```
pip install amgi-aiokafka==0.36.0
```

## Example

This example uses [AsyncFast](https://pypi.org/project/asyncfast/):

```python
from dataclasses import dataclass

from amgi_aiokafka import run
from asyncfast import AsyncFast

app = AsyncFast()


@dataclass
class Order:
    item_ids: list[str]


@app.channel("order-topic")
async def order_topic(order: Order) -> None:
    # Makes an order
    ...


if __name__ == "__main__":
    run(app, "order-topic")
```

Or the application could be run via the commandline:

```commandline
asyncfast run amgi-aiokafka main:app order-topic
```

## Contact

For questions or suggestions, please contact [jack.burridge@mail.com](mailto:jack.burridge@mail.com).

## License

Copyright 2025 AMGI
amgi-aiobotocore 0.36.0
AMGI AWS Services Servers
Requires Python: >=3.10

# amgi-aiobotocore

amgi-aiobotocore is an [AMGI](https://amgi.readthedocs.io/en/latest/) compatible server project, currently supporting
running AMGI applications against [SQS](https://aws.amazon.com/sqs/).

## Installation

```
pip install amgi-aiobotocore==0.36.0
```

## Example

This example uses [AsyncFast](https://pypi.org/project/asyncfast/):

```python
from dataclasses import dataclass

from amgi_aiobotocore.sqs import run
from asyncfast import AsyncFast

app = AsyncFast()


@dataclass
class Order:
    item_ids: list[str]


@app.channel("order-queue")
async def order_queue(order: Order) -> None:
    # Makes an order
    ...


if __name__ == "__main__":
    run(app, "order-queue")
```

Or the application could be run via the commandline:

```commandline
asyncfast run amgi-aiobotocore-sqs main:app order-queue
```

## Contact

For questions or suggestions, please contact [jack.burridge@mail.com](mailto:jack.burridge@mail.com).

## License

Copyright 2025 AMGI
amgi-sqs-event-source-mapping 0.36.0
AMGI SQS event source mapping handler
Requires Python: >=3.10

# amgi-sqs-event-source-mapping

amgi-sqs-event-source-mapping is an adaptor for [AMGI](https://amgi.readthedocs.io/en/latest/) applications to run in an
SQS event source mapped Lambda.

## Installation

```
pip install amgi-sqs-event-source-mapping==0.36.0
```

## Example

This example uses [AsyncFast](https://pypi.org/project/asyncfast/):

```python
from dataclasses import dataclass

from amgi_sqs_event_source_mapping import SqsEventSourceMappingHandler
from asyncfast import AsyncFast

app = AsyncFast()


@dataclass
class Order:
    item_ids: list[str]


@app.channel("order-queue")
async def order_queue(order: Order) -> None:
    # Makes an order
    ...


handler = SqsEventSourceMappingHandler(app)
```

## What it does

- Converts SQS batch events into AMGI `message.receive` events
- Uses the SQS queue name as the AMGI message address
- Supports partial batch failures so only failed messages are retried
- Sends outbound messages back to SQS efficiently using batching
- Optionally manages application startup and shutdown via AMGI lifespan
- Verifies message integrity using the SQS-provided MD5 checksum and retries corrupted messages

## Record handling

- Record bodies are passed to your app as bytes
- SQS record attributes become AMGI headers
- Records are only acknowledged when your app emits `message.ack`
- Records that are not acknowledged are treated as failures and will be retried
- Corrupted messages are detected automatically and retried

## Lifespan

Lifespan support is enabled by default.

- Startup runs once per Lambda execution environment
- Shutdown is attempted when the environment is terminated

Shutdown handling relies on `signal.SIGTERM`, which is supported by Python 3.12 and later Lambda runtimes.

To use fully stateless, per-invocation behavior, disable lifespan:

```python
handler = SqsEventSourceMappingHandler(app, lifespan=False)
```

## Contact

For questions or suggestions, please contact [jack.burridge@mail.com](mailto:jack.burridge@mail.com).

## License

Copyright 2025 AMGI
asyncfast 0.36.0
Add your description here
Requires Python: >=3.10

# AsyncFast

AsyncFast is a modern, event framework for building APIs with Python based on standard Python type hints.

## Installation

```
pip install asyncfast==0.36.0
```

## Example

Create a file `main.py` with:

```python
from asyncfast import AsyncFast
from pydantic import BaseModel

app = AsyncFast()


class Payload(BaseModel):
    id: str
    name: str


@app.channel("topic")
async def on_topic(payload: Payload) -> None:
    print(payload)
```

### Running

To run the app install an AMGI server (at the moment there is only `amgi-aiokafka`) then run:

```
$ asyncfast run amgi-aiokafka main:app topic
```

### AsyncAPI Generation

```
$ asyncfast asyncapi main:app
{
  "asyncapi": "3.0.0",
  "info": {
    "title": "AsyncFast",
    "version": "0.1.0"
  },
  "channels": {
    "OnTopic": {
      "address": "topic",
      "messages": {
        "OnTopicMessage": {
          "$ref": "#/components/messages/OnTopicMessage"
        }
      }
    }
  },
  "operations": {
    "receiveOnTopic": {
      "action": "receive",
      "channel": {
        "$ref": "#/channels/OnTopic"
      }
    }
  },
  "components": {
    "messages": {
      "OnTopicMessage": {
        "payload": {
          "$ref": "#/components/schemas/Payload"
        }
      }
    },
    "schemas": {
      "Payload": {
        "properties": {
          "id": {
            "title": "Id",
            "type": "string"
          },
          "name": {
            "title": "Name",
            "type": "string"
          }
        },
        "required": [
          "id",
          "name"
        ],
        "title": "Payload",
        "type": "object"
      }
    }
  }
}
```

## Contact

For questions or suggestions, please contact [jack.burridge@mail.com](mailto:jack.burridge@mail.com).

## License

Copyright 2025 AMGI
amgi-types 0.36.0
AMGI Types
Requires Python: >=3.10

# amgi-types

This package contains the types for [AMGI](https://amgi.readthedocs.io/en/latest/) applications.

## Installation

```
pip install amgi-types==0.36.0
```

## Contact

For questions or suggestions, please contact [jack.burridge@mail.com](mailto:jack.burridge@mail.com).

## License

Copyright 2025 AMGI
amgi-redis 0.36.0
AMGI Redis Server
Requires Python: >=3.10

# amgi-redis

amgi-redis is an [AMGI](https://amgi.readthedocs.io/en/latest/) compatible server to run AMGI applications against
[Redis](https://redis.io/).

## Installation

```
pip install amgi-redis==0.36.0
```

## Example

This example uses [AsyncFast](https://pypi.org/project/asyncfast/):

```python
from dataclasses import dataclass

from amgi_redis import run
from asyncfast import AsyncFast

app = AsyncFast()


@dataclass
class Order:
    item_ids: list[str]


@app.channel("order-channel")
async def order_channel(order: Order) -> None:
    # Makes an order
    ...


if __name__ == "__main__":
    run(app, "order-channel")
```

Or the application could be run via the commandline:

```commandline
asyncfast run amgi-redis main:app order-channel
```

## Contact

For questions or suggestions, please contact [jack.burridge@mail.com](mailto:jack.burridge@mail.com).

## License

Copyright 2025 AMGI
amgi-kafka-event-source-mapping 0.36.0
Kafka event source mapping adaptor for AMGI applications
Requires Python: >=3.10

# amgi-kafka-event-source-mapping

amgi-kafka-event-source-mapping is an adaptor for [AMGI](https://amgi.readthedocs.io/en/latest/) applications to run in
a Kafka event source mapped environment.

## Installation

```bash
pip install amgi-kafka-event-source-mapping==0.36.0
```

## Example

This example uses [AsyncFast](https://pypi.org/project/asyncfast/):

```python
from dataclasses import dataclass

from amgi_kafka_event_source_mapping import KafkaEventSourceMappingHandler
from asyncfast import AsyncFast

app = AsyncFast()


@dataclass
class Order:
    item_ids: list[str]


@app.channel("orders")
async def orders(order: Order) -> None:
    # Makes an order
    ...


handler = KafkaEventSourceMappingHandler(app)
```

## What it does

- Converts Kafka batch events into AMGI `message.receive` events
- Uses the Kafka topic name as the AMGI message address
- Supports partial batch failures so only failed records are reported
- Sends outbound messages to Kafka using an async producer
- Outbound messages are sent via the same Kafka broker (bootstrap servers) that the records were received from
- Optionally manages application startup and shutdown via AMGI lifespan

## Record handling

- Record values and keys are passed to your app as bytes
- Kafka record headers become AMGI headers
- Records are only acknowledged when your app emits `message.ack`
- Records that emit `message.nack` or are not acknowledged are treated as failures

## Nack handling

By default, records that are negatively acknowledged, or not acknowledged are logged:

```python
handler = KafkaEventSourceMappingHandler(app, on_nack="log")
```

To fail the invocation when any record is nacked, configure the handler to raise an error instead:

```python
handler = KafkaEventSourceMappingHandler(app, on_nack="error")
```

This is useful when running in environments where a failed invocation should trigger a retry, or alert.

When using this mode, handlers **must be idempotent**. Kafka event source mappings may re-deliver records after
failures, restarts, or rebalances, and your application logic should be safe to execute more than once for the same
record.

## Lifespan

Lifespan support is enabled by default.

- Startup runs once per Lambda execution environment
- Shutdown is attempted when the environment is terminated

Shutdown handling relies on `signal.SIGTERM`, which is supported by Python 3.12 and later Lambda runtimes.

To use fully stateless, per-invocation behavior, disable lifespan:

```python
handler = KafkaEventSourceMappingHandler(app, lifespan=False)
```

## Contact

For questions or suggestions, please contact [jack.burridge@mail.com](mailto:jack.burridge@mail.com).

## License

Copyright 2026 AMGI
db-mcp-server 1.0.2
MCP server for MySQL and MongoDB databases — one instance per database, no Docker required
Requires Python: >=3.10
Keywords: mcp, database, mysql, mongodb, ai

# db-mcp-server

MCP server for MySQL and MongoDB databases. One instance per database, no Docker required.

## Installation

```bash
uvx db-mcp-server
```

## Configuration

Configure via environment variables. Each instance connects to a single database.

### MySQL

| Variable | Required | Default | Description |
|----------|----------|---------|-------------|
| `DB_TYPE` | Yes | — | `mysql` |
| `DB_DATABASE` | Yes | — | Database name |
| `DB_PASSWORD` | Yes | — | Password |
| `DB_HOST` | No | `localhost` | Host |
| `DB_PORT` | No | `3306` | Port |
| `DB_USER` | No | `root` | User |
| `DB_MODE` | No | `read-only` | `read-only` or `read-write` |

### MongoDB

| Variable | Required | Default | Description |
|----------|----------|---------|-------------|
| `DB_TYPE` | Yes | — | `mongodb` |
| `DB_DATABASE` | Yes | — | Database name |
| `DB_URL` | Yes | — | Connection URL (`mongodb://...`) |
| `DB_MODE` | No | `read-only` | `read-only` or `read-write` |

## Usage in .mcp.json

```json
{
  "mcpServers": {
    "db-prod": {
      "command": "uvx",
      "args": ["db-mcp-server"],
      "env": {
        "DB_TYPE": "mysql",
        "DB_MODE": "read-only",
        "DB_HOST": "db.example.com",
        "DB_PORT": "3306",
        "DB_USER": "root",
        "DB_PASSWORD": "secret",
        "DB_DATABASE": "myapp"
      }
    }
  }
}
```

For multiple databases, add multiple instances:

```json
{
  "mcpServers": {
    "db-prod": {
      "command": "uvx",
      "args": ["db-mcp-server"],
      "env": { "DB_TYPE": "mysql", "DB_DATABASE": "prod", "..." : "..." }
    },
    "db-staging": {
      "command": "uvx",
      "args": ["db-mcp-server"],
      "env": { "DB_TYPE": "mongodb", "DB_DATABASE": "staging", "..." : "..." }
    }
  }
}
```

## Tools

### MySQL

- **query** — Execute read-only SQL (SELECT, SHOW, DESCRIBE, EXPLAIN, WITH)
- **execute** — Execute write SQL (INSERT, UPDATE, DELETE) — requires `DB_MODE=read-write`
- **describe** — Describe table structure
- **list_tables** — List all tables
- **status** — Show connection info

### MongoDB

- **query** — Find documents in a collection
- **describe** — Collection stats ($collStats)
- **list_collections** — List all collections
- **aggregate** — Execute aggregation pipelines ($out/$merge blocked on read-only)
- **status** — Show connection info

## License

MIT

<!-- mcp-name: io.github.stucchi/db -->
aptpath-models 0.1.3
Consolidated Django ORM models for the Aptpath platform.
Requires Python: >=3.10

# aptpath-models

Consolidated Django ORM models for the Aptpath platform, published as a reusable pip package.

## Installation

```bash
pip install aptpath-models
```

Or directly from source:

```bash
pip install git+<repo-url>
```

## Usage

Add `aptpath_models` to `INSTALLED_APPS` in your Django settings:

```python
INSTALLED_APPS = [
    ...
    'aptpath_models',
]
```

Import models directly:

```python
from aptpath_models.models import Profile, Company, Internship, LMSCourse
```

## Package structure

```
aptpath_models/
  models/
    base.py              # Abstract base models
    neo4j_nodes.py       # Neo4j StructuredNode classes (neomodel)
    users.py             # MongoUser, MongoEmployer, AptPathAdmin, Profile, Permissions
    skills.py            # MongoSkill, MongoCategories, Language, MongoAccountType, MongoRole
    user_profile.py      # UserEducation, UserExperience, UserCertificate
    company.py           # Company, Employment, Invitation, Notification, Activity
    college.py           # College and related models
    courses.py           # MongoCourse, LMSSystem, CourseTemplates
    jobs.py              # Jobs, MongoApplications, JobTemplates, Assessments, DailyStreak
    learning_path.py     # LearningPath, LearningPathModule and templates
    assessments_tests.py # AptpathTests, Durationmodel and templates
    nav.py               # NavigationItem, NavigationSubheader
    xapi.py              # XAPIStatement
    moodle.py            # MoodleCourse, MoodleCourseCompletion, MoodleUser
    logs.py              # OperationLog (all user types)
    internship.py        # Internship, InternshipBatches, Coupon, LeaveRequest, etc.
    labs.py              # Lab, SkillBuilder, CodingAssessment, StudentTasks, etc.
    lms_partner.py       # LMSCourse, CourseEnrollmentPaymentDetails, UserCourseStatus
    blogs.py             # AptpathBlog, Blog and related content models
    employer_ext.py      # JobV2, JobApplicationsV2, Roles, InternJobProfile
    payment.py           # PaymentDetails
    meetings.py          # Recordings
```

## Requirements

- Django >= 4.2
- psycopg2-binary (PostgreSQL)
- neomodel >= 5.0 (Neo4j graph nodes)
- django-ckeditor (rich text blog content)