A demo Piccolo app - a movie database!

Related tags

Miscellaneous pymdb
Overview

PyMDb

Welcome to the Python Movie Database!

Built using Piccolo, Piccolo Admin, and FastAPI.

Created for a presentation given at PyData Global 2021.

Running it

Create a Postgres database called 'pymdb' (see piccolo_conf.py for the details).

pip install -r requirements.txt
piccolo migrations forwards all
piccolo movies load_data
piccolo user create

To run the server:

python main.py

Then load localhost:8000 in your browser. localhost:8000/admin shows the admin interface, and localhost:8000/docs shows the Swagger docs.

Creating something similar

To create your own app like this from scratch, start with the following:

pip install piccolo['all']
piccolo asgi new
You might also like...
Demo Python project using Conda and Poetry

Conda Poetry This is a demonstration of how Conda and Poetry can be used in a Python project for dev dependency management and production deployment.

Serverless demo showing users how they can capture (and obfuscate) their Lambda payloads in Datadog APM
Serverless demo showing users how they can capture (and obfuscate) their Lambda payloads in Datadog APM

Serverless-capture-lambda-payload-demo Serverless demo showing users how they can capture (and obfuscate) their Lambda payloads in Datadog APM This wi

Demo content - Automate your automation!

Automate-AAP2 Demo Content - Automate your automation! A fully automated Ansible Automation Platform. Context Installing and configuring Ansible Autom

Repo to demo translating colab/jupyter notebook to streamlit webapp

Repo to demo translating colab/jupyter notebook to streamlit webapp

Demo of using DataLoader to prevent out of memory

Demo of using DataLoader to prevent out of memory

Sample microservices application demo

Development mode docker-compose -f docker-compose.yml -f docker-compose.dev.yml up -d or export COMPOSE_FILE='docker-compose.yml:docker-compose.dev.ym

Demo of connecting Rasa with Zalo

Demo of connecting Rasa with Zalo

Demo repository for Saltconf21 talk - Testing strategies for Salt states

Saltconf21 testing strategies Demonstration repository for my Saltconf21 talk "Strategies for testing Salt states" Talk recording Slides and demos Get

Demo code for
Demo code for "Logs in distributed systems" webinar

Hexlet Logs Demo Пререквизиты docker-compose python3 Учетка в DataDog Базовое понимание, что такое логи (можно почитать гайд

Comments
  • Engine AC doesn't contain start/close_connection_pool() method.

    Engine AC doesn't contain start/close_connection_pool() method.

    @app.on_event("startup")
    async def open_database_connection_pool():
        engine = engine_finder()
        await engine.start_connection_pool()
    
    
    @app.on_event("shutdown")
    async def close_database_connection_pool():
        engine = engine_finder()
        await engine.close_connection_pool()
    

    This code is in many of the sample applications. The engine_finder() is typed as Engine, which is an abstract class. It doesn't however provide an (@abstract)method for start_connection_pool() and close_connection_pool(). These methods only exist in the concrete subclass for Postgres. Hence vscode/pylance complain about non-existing methods.

    I can do a PR, but am unsure about best solution. Personally I would add these methods as normal methods to the Engine class, just providing a colored_warning() that pooling is not implemented for the provided engine.

    Alternatively all sample programs using the connection pool could be changed like:

    @app.on_event("startup")
    async def open_database_connection_pool():
        engine = engine_finder()
        if isinstance(engine, PostgresEngine):
            await engine.start_connection_pool()
    
    opened by gmos 1
Owner
null
Library to emulate the Sneakers movie effect

py-sneakers Port to python of the libnms C library To recreate the famous data decryption effect shown in the 1992 film Sneakers. Install pip install

Nicolas Rebagliati 11 Aug 27, 2021
Movie recommend community

README 0. 초록 1) 목적 사용자의 Needs를 기반으로 영화를 추천해주는 커뮤니티 서비스 구현 2) p!ck 서비스란? "pick your taste!" 취향대로 영화 플레이리스트(이하 서비스 내에서의 명칭인 '바스켓'이라 함)를 만들고, 비슷한 취향을 가진

null 2 Dec 8, 2021
TurtleBot Control App - TurtleBot Control App With Python

TURTLEBOT CONTROL APP INDEX: 1. Introduction 2. Environments 2.1. Simulated Envi

Rafanton 4 Aug 3, 2022
SWS Filters App - SWS Filters App With Python

SWS Filters App Fun ?? ... Fun ?? Click On photo and see ?? ?? ?? Your Video rec

Sagar Jangid 3 Jul 7, 2022
News-app - This is a news web app for reading news from different sources and topics

News-app - This is a news web app for reading news from different sources and topics

null 1 Feb 2, 2022
Runnable Python demo of ArtLine

artline-demo How to run? pip3 install -r requirements.txt python3 app.py How to use? Run the Flask app Open localhost:5000 in browser Select an image(

Jiang Wenjian 134 Jul 29, 2022
Tiny demo site for exploring SameSite=Lax

samesite-lax-demo Background on my blog: Exploring the SameSite cookie attribute for preventing CSRF This repo holds some tools for exploring the impl

Simon Willison 6 Nov 10, 2021
An extended version of the hotkeys demo code using action classes

An extended version of the hotkeys application using action classes. In adafruit's Hotkeys code, a macro is using a series of integers, assumed to be

Neradoc 5 May 1, 2022
A demo of a data science project using Kedro

iris Overview This is your new Kedro project, which was generated using Kedro 0.17.4. Take a look at the Kedro documentation to get started. Rules and

Khuyen Tran 14 Oct 14, 2022
Demo of a WAM Prolog implementation in Python

Prol: WAM demo This is a simplified Warren Abstract Machine (WAM) implementation for Prolog, that showcases the main instructions, compiling, register

Bruno Kim Medeiros Cesar 62 Dec 26, 2022