Metadata-Version: 2.1
Name: views-query-planning
Version: 1.3.1
Summary: Generate queries for relational databases
Home-page: https://www.github.com/prio-data/views_query_planning
Author: peder2911
Author-email: pglandsverk@gmail.com
Requires-Python: >=3.8,<4.0
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Requires-Dist: PyMonad (>=2.4.0,<3.0.0)
Requires-Dist: SQLAlchemy (>=1.4.27,<2.0.0)
Requires-Dist: click (>=8.0.3,<9.0.0)
Requires-Dist: matplotlib (>=3.5.0,<4.0.0)
Requires-Dist: networkx (>=2.6.3,<3.0.0)
Requires-Dist: psycopg2 (>=2.9.2,<3.0.0)
Requires-Dist: pydot (>=1.4.2,<2.0.0)
Requires-Dist: toolz (>=0.11.2,<0.12.0)
Description-Content-Type: text/markdown


# Views Query Planning

This package exposes a class `views_query_planning.QueryComposer` that makes it
possible to generate queries against a relational database using a network
representation of the database. Such networks can be inferred using the
`views_query_planning.join_network` function that takes a dictionary of
`sqlalchemy` tables and returns a `networkx.DiGraph` that can be passed to the
composer.

For an example service that uses the QueryComposer class to expose columns in a
relational DB RESTfully, see
[base_data_retriever](https://github.com/prio-data/base_data_retriever).

