Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Probe endpoints #21

Merged
merged 1 commit into from
Jan 31, 2024
Merged

Probe endpoints #21

merged 1 commit into from
Jan 31, 2024

Conversation

laurigates
Copy link
Contributor

I did a bit of housekeeping and implemented rudimentary liveness & readiness endpoints.

I reorganized the files a bit to get __name__ to resolve to the service name. It felt like there should be a simpler way, but at least this works. The reason was to get this part working:

@app.route("/")
def hello():
    return "{name} {version}".format(name=__name__, version=__version__)

So the root URL returns the service name and the dynamically generated version string of the running build.

@laurigates laurigates added the enhancement New feature or request label Jan 8, 2024
- Use setuptools-scm for dynamic version
- Run FastAPI in a separate thread to provide liveness & readiness endpoints
- Querying the root returns the name and version information of the package
- Cleaned up dependencies
- Enable more rules on ruff linter
- Refactor project structure
- Remove redundant linting
@laurigates laurigates force-pushed the probe_endpoints branch 2 times, most recently from 54553d0 to 034334b Compare January 31, 2024 17:48
@laurigates laurigates merged commit 231b2ba into main Jan 31, 2024
0 of 2 checks passed
@laurigates laurigates deleted the probe_endpoints branch January 31, 2024 18:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add liveness and readiness endpoints Add description in pyproject.toml
1 participant