semvec/pypi-packages huggingface dataset:
fastoai 1.0.3
Start an API server as OpenAI's
Requires Python: >=3.13

# FastOAI (OpenAI-like API Server)

## Motivation

This project is a simple API server that can be used to serve language models.
It is designed to be simple to use and easy to deploy. It is built using
[FastAPI](https://fastapi.tiangolo.com/), [Pydantic](https://docs.pydantic.dev/)
and [openai-python](https://github.com/openai/openai-python).

## Quick Start

The following [example](./examples/main.py) shows a case to overriding the
original streaming response, we append `[ollama]` to every chunk content.


```python
from fastapi.responses import StreamingResponse
from fastoai import FastOAI
from fastoai.requests import CompletionCreateParams
from fastoai.routers import router
from openai import AsyncOpenAI

app = FastOAI()


@app.post("/chat/completions")
async def create_chat_completions(params: CompletionCreateParams):
    client = AsyncOpenAI(api_key="ollama", base_url="http://localhost:11434/v1")
    response = await client.chat.completions.create(**params.model_dump())
    if params.stream:

        async def _stream():
            async for chunk in response:
                for choice in chunk.choices:
                    choice.delta.content += " [ollama]"
                yield f"data: {chunk.model_dump_json()}\n\n"
            else:
                yield "data: [DONE]\n\n"

        return StreamingResponse(_stream())
    return response

# Order matters, you should firstly define your own entrypoint functions, then
# include the existing router in order to override the original process with
# yours
app.include_router(router)
```

And that's it! You can now run the server using `uvicorn`:

```bash
uvicorn examples.main:app --reload
```

## Architecture

```mermaid
graph TD
    client["`*openai client* (Python/Node.js/RESTful)`"]-->fastoai[FastOAI server]
    fastoai-->ChatCompletion[OpenAI Chat Completion API]
    fastoai-->openai[OpenAI API]
    fastoai-->others[Any other API]
```
color-stream 0.3.1
A tool to run another shell command, and color the stdout/stderr streams green/red

# color_stream
A quick Python script to run another shell command, and split/color the
stdout/stderr streams green/red

## Story

While working with redirecting and assessing the output from another CLI tool,
I needed a way to see what was going to stderr, and what was going to stdout.

This tool highlights the two streams, in real time.

## Usage

```bash
pip install color_stream

color_stream '<another command here>'
## OR ##
python3 -m color_stream '<another command here>'

# Test it with the demo script in this repo:
color_stream python demo_1.py

# Test it with "ls" (success, and error with file that doesn't exist):
color_stream ls file_that_exists.txt file_that_does_not_exist.txt

# Print out the total bytes count statistics:
color_stream --stat python demo_1.py
```

## Limitations

- [ ] reading from stdin is untested, and likely doesn't work
- [ ] throughput speed is currently not benchmarked
- [ ] switching colors is not currently supported
phial-slack 0.12.2
A Slack bot framework
Requires Python: >=3.11
Keywords: slack, bot, framework, phial, slackbot

phial
=====

|Documentation Status| |Github Actions| |Coverage Status| |PyPi|

    A lightweight framework for building slack bots

Phial is a slack bot framework, modelled loosely on
`flask <https://github.com/pallets/flask/>`__.


Table of Contents
-----------------

-  `Usage <#usage>`__
-  `Install <#install>`__
-  `Contribute <#contribute>`__
-  `Licenses <#licenses>`__

Usage
-----

Python:
~~~~~~~

.. code:: python

    from phial import Phial, command, Response

    bot = Phial('---slack token here---')

    @bot.command('greet <name>')
    def greet(name):
        '''A command with an argument which replies to a message'''
        return "Hello {0}".format(name)

    bot.run()

Slack:
~~~~~~

By default the bot requires a prefix of ``!`` before its commands. This
can be changed in the config.

::

    youruser:
    > !greet jim
    bot:
    > Hello Jim

Features:

-  Decorator based command definition
-  Send messages to slack
-  Reply to messages in a thread
-  Reply to messages with a reaction
-  Upload Files

Examples of commands utilising these features can be found in the
`examples <examples/>`__ folder

Install
-------

::

      $ pip install phial-slack

Contribute
----------

If a feature is missing, or you can improve the code please submit a PR
or raise an Issue

Licenses
--------

phial - MIT © 2019 James Seden Smith

Erlenmeyer Flask by Iconic from the Noun Project - `CC BY
3.0 <https://creativecommons.org/licenses/by/3.0/>`__ (used in
`examples/phial.png <examples/phial.png>`__)

.. |Documentation Status| image:: https://readthedocs.org/projects/phial/badge/?version=develop
   :target: http://phial.readthedocs.io/en/develop/
.. |Github Actions| image:: https://github.com/sedders123/phial/workflows/CI/badge.svg
   :target: https://github.com/sedders123/phial/actions
.. |Coverage Status| image:: https://codecov.io/gh/sedders123/phial/branch/develop/graph/badge.svg
   :target: https://codecov.io/gh/sedders123/phial/
.. |PyPi| image:: https://badge.fury.io/py/phial-slack.svg
    :target: https://badge.fury.io/py/phial-slack
fquery 0.4
A graph query engine
Requires Python: >=3.6

# Overview

Projects such as Django and Flask ship with what is known as ORM (object
relational mappers). These abstractions expose much of the underlying
relational behavior (both in schema and queries).This project on the
other hand allows a programmer to stay entirely in the object domain
(hiding any relational functionality contained within), while still
allowing transparent mapping to a relational database.

Only basic transparent mapping of fqueries to SQL is supported:
[Demo](https://github.com/adsharma/fquery/blob/main/tests/test_sql.py).

Only basic transparent mapping of fqueries to [malloy](https://www.malloydata.dev/) is supported:
[Demo](https://github.com/adsharma/fquery/blob/main/tests/test_malloy.py).

# Installation

Requires python3.x

```
pip3 install fquery
```

Running tests:

```
alias t=pytest-3
t
```

You can also run it via tox.

# Tutorial

[Intro](https://adsharma.github.io/fquery/): What is fquery, sample queries
and some information on internals.

[Blog post](https://adsharma.github.io/django-fquery/) on how to use
fquery with Django and get easy access to graphql functionality


# License

This project is made available under the Apache License, version 2.0.

See [LICENSE.txt](license.txt) for details.