semvec/pypi-packages huggingface dataset:
bovine-pubsub 0.5.19
A Quart thing to handle pubsub tasks in particular the event source
License: MIT
Requires Python: <4.0,>=3.11

<!--
SPDX-FileCopyrightText: 2023 Helge

SPDX-License-Identifier: MIT
-->

# bovine_pubsub

__Note__: Development of bovine_pubsub will probably be discontinued

bovine_pubsub is a simple wrapper to enable [server sent events](https://html.spec.whatwg.org/multipage/server-sent-events.html#server-sent-events) in bovine. These are used to communicate real time with clients without forcing them to use polling. If multiple workers are used with `bovine`, one needs to use Redis as the implementation with queues only works for a single process.

Starting with `bovine-pubsub` support for server side clients is available using AMQP. See `examples/bovine_listen.py` for details.

## Usage

The simplest usage example is given by

```python
from quart import Quart
from bovine_pubsub import BovinePubSub

app = Quart(__name__)
BovinePubSub(app)
```

it adds the config variable `app.config["bovine_pub_sub"]` to the Quart application. By calling

```python
await app.config["bovine_pub_sub"].send("channel:test", b"test")
```

one sends the bytes `b"test"` to the channel `channel:test`. By calling

```python
pub_sub.event_stream("channel:test")
```

one receives an async iterator that can be used as server sent events.

## Example usage

A usage example is provided by `examples/basic_app.py`. By running

```bash
python examples/basic.app
```

one can start a server that sends "test" 10 times a new socket is opened on `localhost:5000`. The above implementation will use the local queues. To use with Redis start

```bash
BOVINE_REDIS=redis://localhost:6379 python examples/basic_app.py 
```

with an appropriate value for the environment variable `BOVINE_REDIS`.

## Running tests

Testing redis can be done inside of the docker compose setup, e.g.

```bash
docker compose up -d
docker compose run main /bin/sh
cd bovine_pubsub
poetry install
poetry run pytest
BOVINE_REDIS=redis://redis:6379 poetry run pytest
BOVINE_AMQP=amqp://rabbitmq poetry run pytest
```
bovine-process 0.5.19
Processing of Side Effects of ActivityPub Activities for an ActivityPub Server
License: MIT
Requires Python: <4.0,>=3.11

<!--
SPDX-FileCopyrightText: 2023 Helge

SPDX-License-Identifier: MIT
-->

# bovine_process

__Note__: Development of bovine_process will probably be discontinued

`bovine_process` consists of the side effect logic of Activity objects. This means it contains the code, the logic that for an incoming object, one executes:

- Store object in bovine_store
- Add reference to inbox
- Perform side effects
- Enque object for bovine_pubsub

And a similar list of effects for outgoing objects, i.e

- Store object in bovine_store
- Add reference to outbox
- Perform side effects
- Send objects to follower's inbox
- Enque object for bovine_pubsub

The behavior defined in this package corresponds to [6. Client to Server Interactions](https://www.w3.org/TR/activitypub/#client-to-server-interactions) and [7. Server to Server Interactions](https://www.w3.org/TR/activitypub/#server-to-server-interactions) of the ActivityPub specification. However, only a small subset of side effects is implemented.

## Implemented Side Effects

- Create, Update, Delete on objects, i.e. basic crud
- Like, Dislike, EmojiReact -> add to likes collection; Undo removes
- Announce -> add to share collection; Undo removes
- The same person can Like, Announce, etc.. multiple times
- Create with inReplyTo -> add to replies collection; Delete removes

- Follow and Accept
  - Outgoing Accept of Follow adds to followers
  - Incoming Accept of Follows adds to following

- [ ] Specify Update checks
- [ ] Authority checks.
- [ ] Refactor for easier customization / extension. Adding a new side effect currently requires publishing a new package. This should not be the case.

## Tests

The folder `tests/data` contains test cases what side effects happen in the database for certain cases.
bovine-store 0.5.19
Store for ActivityPub activities, actors and objects
License: MIT
Requires Python: <4.0,>=3.11

<!--
SPDX-FileCopyrightText: 2023 Helge

SPDX-License-Identifier: MIT
-->

# bovine_store

__Note__: Development of bovine_store will probably be discontinued

`bovine_store` is meant to be the module handling storing of
local ActivityPub objects and caching of remote ActivityPub
objects.

## Usage

bovine_store assumes that a database connection is initialized using [tortoise-orm](https://tortoise.github.io/). See `examples/basic_app.py` for how to do this in the context of a quart app.

## TODO

- [ ] When properties of actor are updated, send an update Activity
  - Doesn't fit into the current bovine framework ... bovine_store doesn't know how to send activities
- [ ] Generally rework the actor properties mechanism. It is currently not possible to emulate say Mastodon featured collection with it.
- [ ] bovine_store.models.BovineActorKeyPair needs renamings; and work, e.g. a future identity column should have a uniqueness constraint.
- [ ] Generally the code quality is not as high as it should be.

## Examples

A demonstration webserver can be seen using

```bash
poetry run python examples/basic_app.py
```

Note this is a very basic example. Instructions what the example does are
printed to the command line after start.

Note: This example creates two files `db.sqlite3`, which contains the
database and `context_cache.sqlite`, which contains the cache of json-ld
contexts.

## Running tests

For sqlite3

```bash
poetry run pytest
```

For postgres

```bash
BOVINE_DB_URL=postgres://postgres:secret@postgres:5432/postgres poetry run pytest
```
aspect-python-sdk 0.0.1
Python SDK for Aspect Media Engine API
License: MIT
Requires Python: >=3.9
Keywords: aspect, media, engine, api, sdk

# Aspect Media Engine SDK - Python

This SDK provides easy access to the Aspect Media Engine API.

## Installation

```bash
pip install aspect-media-engine-sdk
```

## Usage

```python
from aspect_media_engine_sdk import AspectMediaEngineClient

client = AspectMediaEngineClient(
    base_url='https://api.aspect.ai',
    api_key='your-api-key'
)

# Use the client
response = client.get_users_me()
print(response)
```

## Custom Extensions

This SDK includes custom extensions beyond the auto-generated API methods:

- Enhanced client with convenience methods
- Utility functions for common operations
- Custom endpoints for advanced use cases

## Environment Variables

- `ASPECT_API_KEY`: Your API key
- `ASPECT_BASE_URL`: Base URL for the API (default: https://api.aspect.ai)

## License

MIT License
aspect-media-engine-sdk 0.1.0
Python SDK for Aspect Media Engine API
License: MIT
Requires Python: >=3.9
Keywords: aspect, media, engine, api, sdk

# Aspect Media Engine SDK - Python

This SDK provides easy access to the Aspect Media Engine API.

## Installation

```bash
pip install aspect-media-engine-sdk
```

## Usage

```python
from aspect_media_engine_sdk import AspectMediaEngineClient

client = AspectMediaEngineClient(
    base_url='https://api.aspect.ai',
    api_key='your-api-key'
)

# Use the client
response = client.get_users_me()
print(response)
```

## Custom Extensions

This SDK includes custom extensions beyond the auto-generated API methods:

- Enhanced client with convenience methods
- Utility functions for common operations
- Custom endpoints for advanced use cases

## Environment Variables

- `ASPECT_API_KEY`: Your API key
- `ASPECT_BASE_URL`: Base URL for the API (default: https://api.aspect.ai)

## License

MIT License