Coder Social home page Coder Social logo

Documentation? about slowapi HOT 8 CLOSED

laurents avatar laurents commented on June 19, 2024
Documentation?

from slowapi.

Comments (8)

laurentS avatar laurentS commented on June 19, 2024

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?

from slowapi.

nocturn9x avatar nocturn9x commented on June 19, 2024

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

from slowapi.

laurentS avatar laurentS commented on June 19, 2024

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.

from slowapi.

nocturn9x avatar nocturn9x commented on June 19, 2024

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?

from slowapi.

laurentS avatar laurentS commented on June 19, 2024

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?

from slowapi.

nocturn9x avatar nocturn9x commented on June 19, 2024

@laurentS sure, done!

from slowapi.

laurentS avatar laurentS commented on June 19, 2024

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

from slowapi.

laurentS avatar laurentS commented on June 19, 2024

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.

from slowapi.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.