question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Passing APIRouter tags to the fast-api DaprActor

See original GitHub issue

Describe the proposal

The routes from the DaprActor appears in the openapi documentation so i think the library should allow to pass the router tags or supply default tags in order to differentiate the Actor routes from the application routes The new Actor should look like:

class DaprActor(object):
    def __init__(self, app: FastAPI, router_tags: List[str]): <----- New
        self._dapr_serializer = DefaultJSONSerializer()
        self._router = APIRouter(tags=tags) <----- New
        self.init_routes(self._router)
        app.include_router(self._router)
......

image Will now look like image

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

0reactions
yairsimantov20commented, May 18, 2022

@berndverst I’ve commented on your pull request if there is something you don’t agree with then please let me know (Its my first pull request in an open source)

Read more comments on GitHub >

github_iconTop Results From Across the Web

Bigger Applications - Multiple Files - FastAPI
You can think of APIRouter as a "mini FastAPI " class. All the same options are supported. All the same parameters , responses...
Read more >
routes appear under tag of Apirouter and parent Apirouter #2492
I already checked if it is not related to FastAPI but to Swagger UI. ... for the passed router into its existing ones,...
Read more >
How to use the fastapi.APIRouter function in fastapi - Snyk
To help you get started, we've selected a few fastapi.APIRouter examples, based on popular ways it is used in public projects.
Read more >
Dapr Python SDK integration with FastAPI
How to create Dapr Python virtual actors and pubsub with the FastAPI extension. The Dapr Python SDK provides integration with FastAPI using the ......
Read more >
How to pass extra data to fastapi APIRouter? - Stack Overflow
Though I don't like it, I modified my App class as following to get around the problem - still looking for cleaner solution....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found