Skip to content

nirdosh17/python-api-using-duckdb

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Containerized Python API using DuckDB

Sample Containerized Python API using DuckDB

Flask API

The service exposes GET http://localhost:8080/stats api which returns aggregated user count from DuckDB database test.duckdb.

API response:

[
	{
		"date": "2021-02-20",
		"users_joined": 2598
	},
	{
		"date": "2021-02-21",
		"users_joined": 2578
	}
]

Running without docker

make run

Running as a container

# builds docker image
make docker.build

# runs docker image
make docker.run

Test Data

Test data is coming from database file test.duckdb. It contains a table called users which has following fields with ~1 million randomly generated rows:

id (int32) joined_date (date) name (varchar) email (varchar)
1 2021-09-14 Jarret Kuhn carsondooley@wolf.name

About

Sample containerized Python API using DuckDB

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy