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

chore: adds additional files to clean target #90

Merged
merged 1 commit into from
Mar 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,8 @@ clean:
find . -name "*.egg-info" -exec rm -rf {} +
find . -name "*.pyc" -exec rm -f {} +
find . -name "__pycache__" -exec rm -rf {} +
rm -rf .coverage .mypy_cache .pytest_cache .ruff_cache *.egg-info build dist htmlcov
find . -name "_version.py" -exec rm -rf {} +
rm -rf .coverage .mypy_cache .pytest_cache .ruff_cache *.egg-info build coverage.xml dist htmlcov coverage.xml

# Target for generating coverage report
cov:
Expand Down
8 changes: 6 additions & 2 deletions examples/connect/fastapi/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,18 @@


@app.get("/fares")
async def get_fares(posit_connect_user_session_token: Annotated[str | None, Header()] = None) -> JSONResponse:
async def get_fares(
posit_connect_user_session_token: Annotated[str | None, Header()] = None,
) -> JSONResponse:
"""
FastAPI example API that returns the first few rows from
a table hosted in Databricks.
"""
global rows

credentials_provider = viewer_credentials_provider(user_session_token=posit_connect_user_session_token)
credentials_provider = viewer_credentials_provider(
user_session_token=posit_connect_user_session_token
)

if rows is None:
query = "SELECT * FROM samples.nyctaxi.trips LIMIT 10;"
Expand Down
Loading