Skip to main content

Squirrels - API Framework for Data Analytics

Project description

Squirrels

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

Documentation: https://squirrels-analytics.github.io/

Source Code: https://github.com/squirrels-analytics/squirrels

Table of Contents

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:

uv sync

And activate the virtual environment with:

source .venv/bin/activate

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

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.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

squirrels-0.5.0b3.tar.gz (139.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

squirrels-0.5.0b3-py3-none-any.whl (165.7 kB view details)

Uploaded Python 3

File details

Details for the file squirrels-0.5.0b3.tar.gz.

File metadata

  • Download URL: squirrels-0.5.0b3.tar.gz
  • Upload date:
  • Size: 139.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.3

File hashes

Hashes for squirrels-0.5.0b3.tar.gz
Algorithm Hash digest
SHA256 f3e8bf197a994987ccfcc301743260712a4924fc9eb4ff6a288241be4d90a3ba
MD5 2b31e3cc24945a354f94968e7ed68d11
BLAKE2b-256 447105228b4d6089e110a591dd578e98c4aac6401cd21c8e38fa5070fefd80d7

See more details on using hashes here.

File details

Details for the file squirrels-0.5.0b3-py3-none-any.whl.

File metadata

  • Download URL: squirrels-0.5.0b3-py3-none-any.whl
  • Upload date:
  • Size: 165.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.3

File hashes

Hashes for squirrels-0.5.0b3-py3-none-any.whl
Algorithm Hash digest
SHA256 e5a11d42514b08edcbade7c463a977b037f2ca2564e8875f434bd5e4a2038d55
MD5 e2586ad7e37af1c6aa6b5a28c1ebb48a
BLAKE2b-256 4c051bd0f5fd0afa21f46749f539a71ca7047c41d95f4cafc680bb0dd92436ec

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page