Metadata-Version: 2.4
Name: squirrels
Version: 0.5.0b4
Summary: Squirrels - API Framework for Data Analytics
Project-URL: Homepage, https://squirrels-analytics.github.io
Project-URL: Repository, https://github.com/squirrels-analytics/squirrels
Project-URL: Documentation, https://squirrels-analytics.github.io
Author-email: Tim Huang <tim.yuting@hotmail.com>
License-Expression: Apache-2.0
License-File: LICENSE
Classifier: Intended Audience :: Developers
Classifier: Topic :: Software Development :: Libraries :: Application Frameworks
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Typing :: Typed
Requires-Python: ~=3.10
Requires-Dist: authlib<2,>=1.5.2
Requires-Dist: bcrypt<5,>=4.0.1
Requires-Dist: cachetools<6,>=5.3.2
Requires-Dist: duckdb<2,>=1.1.3
Requires-Dist: fastapi<1,>=0.112.1
Requires-Dist: gitpython<4,>=3.1.41
Requires-Dist: inquirer<4,>=3.2.1
Requires-Dist: itsdangerous<3,>=2.2.0
Requires-Dist: jinja2<4,>=3.1.3
Requires-Dist: libpass<2,>=1.9.0
Requires-Dist: matplotlib<4,>=3.8.3
Requires-Dist: mcp>=1.9.2
Requires-Dist: networkx<4,>=3.2.1
Requires-Dist: pandas<3,>=2.1.4
Requires-Dist: polars<2,>=1.14.0
Requires-Dist: pyarrow>=19.0.1
Requires-Dist: pydantic<3,>=2.8.2
Requires-Dist: pyjwt<3,>=2.8.0
Requires-Dist: python-dotenv<2,>=1.0.1
Requires-Dist: python-multipart<1,>=0.0.9
Requires-Dist: pyyaml<7,>=6.0.1
Requires-Dist: sqlalchemy<3,>=2.0.25
Requires-Dist: sqlglot>=26.12.1
Requires-Dist: uvicorn<1,>=0.30.6
Description-Content-Type: text/markdown

# Squirrels

Squirrels is an API framework that lets you create REST APIs for dynamic data analytics!

**Documentation**: <a href="https://squirrels-analytics.github.io/" target="_blank">https://squirrels-analytics.github.io/</a>

**Source Code**: <a href="https://github.com/squirrels-analytics/squirrels" target="_blank">https://github.com/squirrels-analytics/squirrels</a>

## Table of Contents

- [Main Features](#main-features)
- [License](#license)
- [Contributing to squirrels](#contributing-to-squirrels)
    - [Setup](#setup)
    - [Testing](#testing)
    - [Project Structure](#project-structure)

## Main Features

Here are a few of the things that squirrels can do:

- Connect to any database by specifying its SQLAlchemy url (in `squirrels.yml`) or by using its native connector library in python (in `connections.py`).
- Configure API routes for datasets (in `squirrels.yml`) without writing code.
- Configure parameter widgets (types include single-select, multi-select, date, number, etc.) for your datasets (in `parameters.py`).
- Use Jinja SQL templates (just like dbt!) or python functions (that return a Python dataframe such as polars or pandas) to define dynamic query logic based on parameter selections.
- Query multiple databases and join the results together in a final view in one API endpoint/dataset!
- Test your API endpoints with Squirrels Studio or by a command line that generates rendered sql queries and results (for a given set of parameter selections).
- Define User model (in `user.py`) and authorize privacy scope per dataset (in `squirrels.yml`). The user's attributes can even be used in your query logic!

## License

Squirrels is released under the Apache 2.0 license.

See the file LICENSE for more details.

## Contributing to squirrels

The sections below describe how to set up your local environment for squirrels development and run unit tests. A high level overview of the project structure is also provided.

### Setup

This project requires python version 3.10 or above to be installed. It also uses the python package manager `uv`. Information on setting up poetry can be found at: https://docs.astral.sh/uv/getting-started/installation/.

Then, to install all dependencies in a virtual environment, run:

```bash
uv sync
```

And activate the virtual environment with:

```bash
source .venv/bin/activate
```

To confirm that the setup worked, run the following to show the help page for all squirrels CLI commands:

```bash
sqrl -h
```

### Testing

Run `uv run pytest`. Or if you have the virtual environment activated, simply run `pytest`.

### Project Structure

From the root of the git repo, the source code can be found in the `squirrels` folder and unit tests can be found in the `tests` folder.

To understand what a specific squirrels command is doing, start from the `_command_line.py` file as your entry point.

The library version is maintained in both the `pyproject.toml` and the `squirrels/_version.py` files.
