oe-python-template-example 0.2.11__tar.gz → 0.2.12__tar.gz

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.
@@ -75,4 +75,9 @@ node_modules/
75
75
  # Copier
76
76
  *.rej
77
77
 
78
+
79
+ # Vercel
80
+ .vercel
81
+
82
+
78
83
  # Application specific
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: oe-python-template-example
3
- Version: 0.2.11
3
+ Version: 0.2.12
4
4
  Summary: 🧠 Example project scaffolded and kept up to date with OE Python Template (oe-python-template).
5
5
  Project-URL: Homepage, https://oe-python-template-example.readthedocs.io/en/latest/
6
6
  Project-URL: Documentation, https://oe-python-template-example.readthedocs.io/en/latest/
@@ -153,6 +153,7 @@ Beyond development tooling, projects generated with this template include the co
153
153
  6. Simple Web UI with [Streamlit](https://streamlit.io/)
154
154
  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/)
155
155
  8. Documentation including badges, setup instructions, contribution guide and security policy
156
+ 9. Preparation to deploy API as serverless function to Vercel
156
157
 
157
158
  Explore [here](https://github.com/helmut-hoffer-von-ankershoffen/oe-python-template-example) for what's generated out of the box.
158
159
 
@@ -303,6 +304,11 @@ uv sync --all-extras # Install streamlit dependen
303
304
  uv run streamlit run examples/streamlit.py # Serve on localhost:8501, opens browser
304
305
  ```
305
306
 
307
+ ### Vercel Serverless Function
308
+
309
+ Serve the API as a [serverless function on Vercel](https://oe-python-template-example.vercel.app/)
310
+
311
+
306
312
  ## Notebooks
307
313
 
308
314
  ### Jupyter
@@ -92,6 +92,7 @@ Beyond development tooling, projects generated with this template include the co
92
92
  6. Simple Web UI with [Streamlit](https://streamlit.io/)
93
93
  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/)
94
94
  8. Documentation including badges, setup instructions, contribution guide and security policy
95
+ 9. Preparation to deploy API as serverless function to Vercel
95
96
 
96
97
  Explore [here](https://github.com/helmut-hoffer-von-ankershoffen/oe-python-template-example) for what's generated out of the box.
97
98
 
@@ -242,6 +243,11 @@ uv sync --all-extras # Install streamlit dependen
242
243
  uv run streamlit run examples/streamlit.py # Serve on localhost:8501, opens browser
243
244
  ```
244
245
 
246
+ ### Vercel Serverless Function
247
+
248
+ Serve the API as a [serverless function on Vercel](https://oe-python-template-example.vercel.app/)
249
+
250
+
245
251
  ## Notebooks
246
252
 
247
253
  ### Jupyter
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "oe-python-template-example"
3
- version = "0.2.11"
3
+ version = "0.2.12"
4
4
  description = "🧠 Example project scaffolded and kept up to date with OE Python Template (oe-python-template)."
5
5
  readme = "README.md"
6
6
  authors = [
@@ -254,7 +254,7 @@ source = ["src/"]
254
254
 
255
255
 
256
256
  [tool.bumpversion]
257
- current_version = "0.2.11"
257
+ current_version = "0.2.12"
258
258
  parse = "(?P<major>\\d+)\\.(?P<minor>\\d+)\\.(?P<patch>\\d+)"
259
259
  serialize = ["{major}.{minor}.{patch}"]
260
260
  search = "{current_version}"
@@ -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)
@@ -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_example.api:api",
69
+ "oe_python_template_example.api:app",
70
70
  host=host,
71
71
  port=port,
72
72
  reload=watch,