Flask Example Should use Pinned Flask Version

Aperta
#1,114 3 commenti 1 reazione 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
35/100
Tipo di issue
Documentazione
Chiarezza
Da chiarire
Stato di attività
Ferma
Stack tecnologico
flask, python
Ambito
documentation

Direzione di ricerca

Inizia con l’esempio di ambiente Python collegato nell’issue e verifica come la sua configurazione Flask gestisce le versioni e gli strumenti del progetto. Confronta l’approccio documentato con requirements.txt, uv e poetry e verifica se il debugger di VSCode menzionato funziona all’interno della shell Nix. Il lavoro è completato quando l’esempio fornisce indicazioni concrete e aggiornate per i progetti Flask nuovi ed esistenti.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

site

Observations

In the python environment example, Flask has no pinned version. Additionally, other python tooling, like uv is completely ignored. If this is supposed to replace other abstract tooling like pip, requirements.txt, uv, poetry, pipfile, it should be more concrete.

Problem

As someone new to Nix (I use it only for work, and don't like modifying anything), but knows Python and Flask, the current Python-Flask example does not factor into consideration real Python Flask backend projects. Existing projects will use at least a requirements.txt, but projects created recently will probably be using poetry or uv. I've personally had to do a Flask v2 to v3 migration, so it is odd that Flask isn't even pinned to a version like 3. How would someone pin to 3.X?

Also, I notice that we are running the Python application in the shell. This is good for a simple hello world app, but when a project is complicated, a Debugger is good. I usually run a debugger using VSCode. It's unclear whether the VSCode Python debugger would work even if it ran inside the nix shell.

Approaches

The example should be applicable to new Python projects as well as existing Python projects that Python developments can migrate. My website's source code has plenty of room for improvement. It uses a requirements.txt file and is deployed on Heroku. It should be deployed using Docker but the dev environment itself could be better. I'll create another issue too regarding "deployment example"

Willing to help?

Only with answering questions / reviewing

Lingua principale
Nix
Stelle
4k
Fork
343
Merge medio
20h 27m
PR unite (30g)
10

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di NixOS/nix.dev

Tutte le issue di NixOS/nix.dev

Issue simili

Altre issue su Documentation

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.