oe-python-template 0.8.3__py3-none-any.whl → 0.8.5__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
oe_python_template/api.py CHANGED
@@ -41,7 +41,7 @@ def get_service() -> Generator[Service, None, None]:
41
41
  pass
42
42
 
43
43
 
44
- api = FastAPI(
44
+ app = FastAPI(
45
45
  root_path="/api",
46
46
  title=TITLE,
47
47
  contact={
@@ -177,5 +177,5 @@ async def echo_v2(request: Utterance) -> Echo:
177
177
  return Service.echo(request)
178
178
 
179
179
 
180
- api.mount("/v1", api_v1)
181
- api.mount("/v2", api_v2)
180
+ app.mount("/v1", api_v1)
181
+ app.mount("/v2", api_v2)
oe_python_template/cli.py CHANGED
@@ -66,7 +66,7 @@ def serve(
66
66
  os.environ["UVICORN_HOST"] = host
67
67
  os.environ["UVICORN_PORT"] = str(port)
68
68
  uvicorn.run(
69
- "oe_python_template.api:api",
69
+ "oe_python_template.api:app",
70
70
  host=host,
71
71
  port=port,
72
72
  reload=watch,
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: oe-python-template
3
- Version: 0.8.3
3
+ Version: 0.8.5
4
4
  Summary: 🧠 Copier template to scaffold Python projects compliant with best practices and modern tooling.
5
5
  Project-URL: Homepage, https://oe-python-template.readthedocs.io/en/latest/
6
6
  Project-URL: Documentation, https://oe-python-template.readthedocs.io/en/latest/
@@ -150,6 +150,7 @@ Beyond development tooling, projects generated with this template include the co
150
150
  6. Simple Web UI with [Streamlit](https://streamlit.io/)
151
151
  7. Configuration to run the CLI and API in a Docker container including setup for [Docker Compose](https://docs.docker.com/get-started/docker-concepts/the-basics/what-is-docker-compose/)
152
152
  8. Documentation including badges, setup instructions, contribution guide and security policy
153
+ 9. Preparation to deploy API as serverless function to Vercel
153
154
 
154
155
  Explore [here](https://github.com/helmut-hoffer-von-ankershoffen/oe-python-template-example) for what's generated out of the box.
155
156
 
@@ -296,6 +297,11 @@ uv sync --all-extras # Install streamlit dependen
296
297
  uv run streamlit run examples/streamlit.py # Serve on localhost:8501, opens browser
297
298
  ```
298
299
 
300
+ ### Vercel Serverless Function
301
+
302
+ Serve the API as a [serverless function on Vercel](https://oe-python-template.vercel.app/)
303
+
304
+
299
305
  ## Notebooks
300
306
 
301
307
  ### Jupyter
@@ -1,12 +1,12 @@
1
1
  oe_python_template/__init__.py,sha256=R49r9JJnOBe4HrPGcu37ySvguxpGzQgTM7LtlyRnUK0,436
2
- oe_python_template/api.py,sha256=e1fAF284BFXXYuRWg5X-sZaF11Y4dOIHPHmxg_jh1_M,5010
3
- oe_python_template/cli.py,sha256=76x4P8IoBThEueexvQLSKkU3h7l2eGwtqemY33QveIo,3729
2
+ oe_python_template/api.py,sha256=j4LHMUDs9xAC_9Rw5p53cr5SycxqAYnGHJ1FdWI-SnY,5010
3
+ oe_python_template/cli.py,sha256=p44okms9WHQfESWVGoGYwzBvAe6dX3zC_pDIMjQMx9w,3729
4
4
  oe_python_template/constants.py,sha256=Z1c06l5DeRuFxYVLHihHHTYvr8_Qh0nyzVKOe5X3ZNs,350
5
5
  oe_python_template/models.py,sha256=L9uwom3TkuOpN3R30bGKEBQKcrLLEMc-O9e8VVSNTGw,838
6
6
  oe_python_template/service.py,sha256=ZMeCQOfIJP0TAD9cYgOdA1tis8NuCK8Xt8wB-xtWHmo,1634
7
7
  oe_python_template/settings.py,sha256=87VZ1IEGbV3ivDjpG6x_Mgs2inH2hVd4ZD7DGsHOYFE,743
8
- oe_python_template-0.8.3.dist-info/METADATA,sha256=iPjNBLYeJCyOU7G-HzxD2jfoW7gcPO03Ni-FaoLmEzg,28463
9
- oe_python_template-0.8.3.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
10
- oe_python_template-0.8.3.dist-info/entry_points.txt,sha256=IroSSWhLGxus9rxcashkYQda39TTvf7LbUMYtOKXUBE,66
11
- oe_python_template-0.8.3.dist-info/licenses/LICENSE,sha256=5H409K6xzz9U5eUaoAHQExNkoWJRlU0LEj6wL2QJ34s,1113
12
- oe_python_template-0.8.3.dist-info/RECORD,,
8
+ oe_python_template-0.8.5.dist-info/METADATA,sha256=mYcNht4xp8zWikIWQ3_vrKgq9UTiqeO4gHA_mvOv098,28650
9
+ oe_python_template-0.8.5.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
10
+ oe_python_template-0.8.5.dist-info/entry_points.txt,sha256=IroSSWhLGxus9rxcashkYQda39TTvf7LbUMYtOKXUBE,66
11
+ oe_python_template-0.8.5.dist-info/licenses/LICENSE,sha256=5H409K6xzz9U5eUaoAHQExNkoWJRlU0LEj6wL2QJ34s,1113
12
+ oe_python_template-0.8.5.dist-info/RECORD,,