oe-python-template 0.8.2__tar.gz → 0.8.4__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
3
- Version: 0.8.2
3
+ Version: 0.8.4
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
@@ -89,6 +89,7 @@ Beyond development tooling, projects generated with this template include the co
89
89
  6. Simple Web UI with [Streamlit](https://streamlit.io/)
90
90
  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/)
91
91
  8. Documentation including badges, setup instructions, contribution guide and security policy
92
+ 9. Preparation to deploy API as serverless function to Vercel
92
93
 
93
94
  Explore [here](https://github.com/helmut-hoffer-von-ankershoffen/oe-python-template-example) for what's generated out of the box.
94
95
 
@@ -235,6 +236,11 @@ uv sync --all-extras # Install streamlit dependen
235
236
  uv run streamlit run examples/streamlit.py # Serve on localhost:8501, opens browser
236
237
  ```
237
238
 
239
+ ### Vercel Serverless Function
240
+
241
+ Serve the API as a [serverless function on Vercel](https://oe-python-template.vercel.app/)
242
+
243
+
238
244
  ## Notebooks
239
245
 
240
246
  ### Jupyter
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "oe-python-template"
3
- version = "0.8.2"
3
+ version = "0.8.4"
4
4
  description = "🧠 Copier template to scaffold Python projects compliant with best practices and modern tooling."
5
5
  readme = "README.md"
6
6
  authors = [{ name = "Helmut Hoffer von Ankershoffen", email = "helmuthva@gmail.com" }]
@@ -252,7 +252,7 @@ source = ["src/"]
252
252
 
253
253
 
254
254
  [tool.bumpversion]
255
- current_version = "0.8.2"
255
+ current_version = "0.8.4"
256
256
  parse = "(?P<major>\\d+)\\.(?P<minor>\\d+)\\.(?P<patch>\\d+)"
257
257
  serialize = ["{major}.{minor}.{patch}"]
258
258
  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.api:api",
69
+ "oe_python_template.api:app",
70
70
  host=host,
71
71
  port=port,
72
72
  reload=watch,