Giter Club home page Giter Club logo

starlette-example's People

Contributors

codescribblr avatar devnat0 avatar tomchristie avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

starlette-example's Issues

Single app or multi-app example(s)?

Is this project intended to be a single app example, or could it potentially include multiple examples of various features/usage with other libs? I am sitting on enough experiments and test code that I could probably pick out some useful things to PR in either case.

venv/bin/pip not found

I'm in a conda environment and tried running
scripts/install after git clone https://github.com/encode/starlette-example.git cd starlette-example

and got

scripts/install: line 1: virtualenv: command not found
scripts/install: line 2: venv/bin/pip: No such file or directory

The Jinja

I face the following error.

Traceback (most recent call last):
  File "app.py", line 4, in <module>
    from starlette.templating import Jinja2Templates
ModuleNotFoundError: No module named 'starlette.templating'

The starlette was installed using conda but the templating module is not present in that.

Add pre-commit config and GitHub Action to prevent code formatting issues.

Add pre-commit config and GitHub Action to prevent code formatting issues on pull requests.

image

E. g. .pre-commit-config.yaml

repos:
  - repo: https://github.com/pre-commit/pre-commit-hooks
    rev: v4.3.0
    hooks:
      - id: trailing-whitespace
      - id: end-of-file-fixer

.github/workflows/main.yml

name: CI
on:
  push
jobs:
  lint:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v3
      - uses: actions/setup-python@v4
        with:
          python-version: "3.7"
      - uses: pre-commit/[email protected]
        if: always()

Flag as template repository

Could we have this flagged at a template repository? It will let users generate new repositories with the same directory structure and files.

settings-template

Add instructions for gunicorn

On heroku, using

web: gunicorn app:app

in the Procfile leads to an error:

Traceback (most recent call last):
File "/app/.heroku/python/lib/python3.6/site-packages/gunicorn/workers/sync.py", line 135, in handle
self.handle_request(listener, req, client, addr)
File "/app/.heroku/python/lib/python3.6/site-packages/gunicorn/workers/sync.py", line 176, in handle_request
respiter = self.wsgi(environ, resp.start_response)
TypeError: __call__() takes 2 positional arguments but 3 were given

Add tests

It'd be nice to add a tests.py to demonstrate how to write tests against this app.

Pull requests would be very welcome! ๐Ÿ˜Ž

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.