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

Documentation? #9

Closed
nocturn9x opened this issue Aug 29, 2020 · 8 comments
Closed

Documentation? #9

nocturn9x opened this issue Aug 29, 2020 · 8 comments

Comments

@nocturn9x
Copy link

Hi, I was looking for a way to rate limit my production FastAPI backend and I stumbled upon this repo, which seems to meet my needs, but lacks documentation. I was able to grasp some stuff from the examples and by reading the source code, but is there any chance to find proper documentation for this project?

Best Regards, and thanks for making this!

@laurentS
Copy link
Owner

Hi @nocturn9x, thanks for your interest. You're right, there is no proper documentation yet. I'm doing this on my spare time, and there hasn't been enough of it for docs :)
What do you think would be most important to have first? examples? API reference? something else?

@nocturn9x
Copy link
Author

First of all, thanks for the time you're dedicating to this project, and to reply to my issues as well :). I think that an API reference would be extremely useful, at least in my opinion, because it would cover the entire codebase. Also, I see you use standard compliant docstrings so using a tool such as sphinx and hosting the documentation on readthedocs shouldn't be too much of a hassle. Examples can, and should, be added later when a proper reference is in place

@laurentS
Copy link
Owner

Cool, thanks for the feedback! I wasn't aiming to do much more complex stuff than readthedocs or equivalent ;) I'll update this issue when it's available.

@nocturn9x
Copy link
Author

nocturn9x commented Aug 29, 2020

I'll take advantage of this open issue to ask another question as well, tell me if I should open another issue instead. But is there any way to return a completely custom JSON response after the rate limit being hit? I have an APIResponse object which is subclass of pydantic.BaseModel and would like to return a custom JSON to stay consistent with the rest of my API :). Also, is there any guide on how to configure redis as a backend to store rate limiting data?

@laurentS
Copy link
Owner

Can you open a separate ticket for this? I don't have an immediate answer for you, but I think there should be a way to do it. Can you include an example of what you'd like as a JSON response?

@nocturn9x
Copy link
Author

@laurentS sure, done!

@laurentS
Copy link
Owner

laurentS commented Oct 1, 2020

I've setup minimal docs at https://slowapi.readthedocs.io/en/latest/ Will keep them growing, but thought I'd mention it already!

@laurentS
Copy link
Owner

Closing this as the docs are now at https://slowapi.readthedocs.io/en/latest/
If you need more additions, please open new issues, and we can look into them.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants