oe-python-template-example 0.2.11__py3-none-any.whl → 0.2.12__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.
@@ -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,
@@ -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
@@ -1,12 +1,12 @@
1
1
  oe_python_template_example/__init__.py,sha256=Ks3KjkBuzEO1gaezabSfal_WVOsJbuweHwRCs58oRv4,435
2
- oe_python_template_example/api.py,sha256=_4-Xauw5jA9a6VPTJ5RBjBcbB7gd6Pn585b5OULF13A,5034
3
- oe_python_template_example/cli.py,sha256=xqIiE2iYkzkGIj9g94ISolGmRd09gxyjbyKhSV1OStM,3761
2
+ oe_python_template_example/api.py,sha256=jP3nVgU06OHK0F9oi3h5_xZRWYsAu2fF80ezGshLk70,5034
3
+ oe_python_template_example/cli.py,sha256=0Du3lJATAT1Gnh02WuJuGfHAbL0eYD7YZNvVP47_mNQ,3761
4
4
  oe_python_template_example/constants.py,sha256=6uQHr2CRgzWQWhUQCRRKiPuFhzKB2iblZk3dIRQ5dDc,358
5
5
  oe_python_template_example/models.py,sha256=IbegPBFJq0OCAWS70V-ozl6coMd0dC2OsHZY-nIumGs,846
6
6
  oe_python_template_example/service.py,sha256=2bxTQH9JeM4ugoQMpTp-pOdANOSZ0HZrQc4JpJzXBqg,1650
7
7
  oe_python_template_example/settings.py,sha256=mQu7Bl2EhR6taQLqbaK1s86Ngn3kLVeEoMyhCqbydig,751
8
- oe_python_template_example-0.2.11.dist-info/METADATA,sha256=KEr4lWCmnidYtqTN6UOakd4ouyeg4TOVU0tsAU7Ox60,29557
9
- oe_python_template_example-0.2.11.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
10
- oe_python_template_example-0.2.11.dist-info/entry_points.txt,sha256=S2eCPB45b1Wgj_GsDRFAN-e4h7dBA5UPxT8od98erDE,82
11
- oe_python_template_example-0.2.11.dist-info/licenses/LICENSE,sha256=5H409K6xzz9U5eUaoAHQExNkoWJRlU0LEj6wL2QJ34s,1113
12
- oe_python_template_example-0.2.11.dist-info/RECORD,,
8
+ oe_python_template_example-0.2.12.dist-info/METADATA,sha256=NEPXbbspobLezIrlQ8A-Iam8wVDCKKxFAaLyBUR7wXo,29752
9
+ oe_python_template_example-0.2.12.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
10
+ oe_python_template_example-0.2.12.dist-info/entry_points.txt,sha256=S2eCPB45b1Wgj_GsDRFAN-e4h7dBA5UPxT8od98erDE,82
11
+ oe_python_template_example-0.2.12.dist-info/licenses/LICENSE,sha256=5H409K6xzz9U5eUaoAHQExNkoWJRlU0LEj6wL2QJ34s,1113
12
+ oe_python_template_example-0.2.12.dist-info/RECORD,,