about summary refs log tree commit diff stats
path: root/python/README.md
diff options
context:
space:
mode:
authorSoispha <soispha@vhack.eu>2023-10-01 07:22:09 +0200
committerSoispha <soispha@vhack.eu>2023-10-01 07:22:09 +0200
commit77e8740363711c3916f723c05d5833e1f90e9d30 (patch)
tree41ab9dd847245464df26e28b33930a67909dccde /python/README.md
parentFix(c): Specify correct path instead of `./rust` (diff)
downloadflake-templates-77e8740363711c3916f723c05d5833e1f90e9d30.tar.gz
flake-templates-77e8740363711c3916f723c05d5833e1f90e9d30.zip
feat(python): Init
Diffstat (limited to 'python/README.md')
-rw-r--r--python/README.md46
1 files changed, 46 insertions, 0 deletions
diff --git a/python/README.md b/python/README.md
new file mode 100644
index 0000000..aa95851
--- /dev/null
+++ b/python/README.md
@@ -0,0 +1,46 @@
+# python-app
+
+## Setting up
+
+Rename `python_app` directory, name and main entrypoint in `setup.cfg`.
+
+## Using
+
+- running: `nix run`
+- dev shell (for IDE): `nix develop`
+- edit `setup.cfg` to add requirements (install_requires)
+- edit `requirements.txt` for dev shell requirements
+
+### Docker image
+
+- build: `nix build .#image -o image`
+- load to docker: `docker load < ./image`
+
+## Updating mach-nix pypi deps db
+
+Add to inputs:
+
+```nix
+pypi-deps-db = {
+  url = "github:davhau/pypi-deps-db/0000000000000000000000000000000000000000";
+  flake = false;
+};
+mach-nix.inputs.pypi-deps-db.follows = "pypi-deps-db";
+```
+
+## Adding git dependency
+
+Add to mkPython ([more info](https://github.com/DavHau/mach-nix/blob/master/examples.md)):
+
+```nix
+packagesExtra = [
+  (mach.buildPythonPackage
+    {
+      src = builtins.fetchGit {
+        url = "https://github.com/user/repo";
+        ref = "branch";
+        rev = "0000000000000000000000000000000000000000";
+      };
+    })
+];
+```