Protect API docs behind authentication? · Issue #364 · fastapi/fastapi Basic Question Does FastAPI provide a method for implementing authentication middleware or similar on the docs themselves (e.g. to protect access to /docs and /redoc)? Additional context My company... GitHub · github.com You can protect your fastapi docs behind auth so that not only can certain roles not run certain routes, but they cannot even see the docs at all. This way no one that shouldn’t be poking around can even discover routes they shouldn’t be using. Here is the soluteion provided by @kennylajara
Posts tagged: thought
All posts with the tag "thought"
891 posts
latest post 2026-09-24
Publishing rhythm
Cancel subscriptions Cancel subscriptions immediately or at the end of the subscription period with proration options, invoice handling, and automatic cancellation after failed payment attempts. stripe.com This is a handy guide to cancelling stripe subscriptions. You can even inverse it by flipping to and re activate the subscription.
External Link stripe.com You can find your customers next billing date through the stripe api by using. and passing in customer, customer_details, subscription, or schedule. Within the invoice, you can find the next_payment_attempt as a epoch.
Search Use the search APIs to look up and retrieve objects in your Stripe data. Using search is a faster alternative to paginating through all resources. stripe.com Stripe has it’s own query language for querying data. I’m just getting into using it and it seems pretty good so far. I needed to lookup the price for products. I was able to find prices for my product using the python api as shown below.
stripe-keys-and-ids.tsv tsv Stripe has so many keys and ids this is a very helpful list to decode what exactly an id is for.
Dang this is such a good message. I can’t exactly relate to being forced into the overworking situation that PirateSofware is talking about. I can relate to being conditioned to feeling a certain way and changing that is very difficult. I can also relate to not feeling like I am getting enough done in the day. Sometimes a bit of separation is good.
External Link stackoverflow.com Get those print colors exact
page-break-after CSS property - CSS | MDN The page-break-after CSS property adjusts page breaks after the current element. MDN Web Docs · developer.mozilla.org I’m working on something that might go to print, so I want the page breaks to happen somewhat in my control as the content author. As I do my writing I break my content up in to many short sections using h2, sometimes an h3. These are generally short sections that go together, should stay together, and typically are not too lengthy to cause a large white space in print. I found a way in css to only allow page breaks to happen on h2 and h3, and it turned out perfect, suck it WSIWIG editors
Go by Example gobyexample.com Fantastic resource for learning go. You work through small examples quickly, learning single concepts along the way.
How to Build a Website or App - Syntax #696 This podcast episode covers a wide range of topics related to building a website or web application from start to finish. syntax.fm Use good data or good fake data make it have some variation like long and short text Don’t use a database if you need one, static content is eaiser to manage end to end test, (does the site load page x) You DONT NEED all this complexity, you can deploy a site with HTML and CSS.
@willmcgugan) on X — Just a wee thing that came up today. I think this is kind of neat." loading="lazy"> Will McGugan ( @willmcgugan) on X Just a wee thing that came up today. I think this is kind of neat. X (formerly Twitter) · twitter.com Textual is so sick, Will just made a live markdown editor in the terminal!
Sebastián Ramírez (@tiangolo) on X Now @FastAPI has 65k+ GitHub stars! ✨🎉 Since today, FastAPI has a few more GitHub stars than Flask. 🤯 Now FastAPI is the second most starred Python web framework, right after Django. 🥈 X (formerly Twitter) · twitter.com Fastapi passes flask in GitHub stars!
Nice take by @t3dotgg. Some of the old patterns that go deep into webdev, MVC, separation of concerns, REST, are things we are told to believe on day one, thrown so many things, no mental bandwidth, or experience to form our own opinions we must take them as fact. Rarely do we take these facts and revisit them with our new understandings years later.
DoomponyLewis 🦄 (@DoomponyLewis) on X @wtravishubbard Management is abhorrent to me X (formerly Twitter) · twitter.com Today I learned the meaning of abhorrent abhorrent ăb-hôr′ənt, -hŏr′- adjective Disgusting, loathsome, or repellent. Feeling repugnance or loathing.
Heroicons Beautiful hand-crafted SVG icons, by the makers of Tailwind CSS. Heroicons · heroicons.com heroicons is a really nice set of many of the basic icons that you will need for building nice ui’s. They have a really nice copy as svg or jsx button, so that you can just yank it and paste it on your page without any extra packages or installation.
Uptime Kuma A self-hosted monitoring tool uptime.kuma.pet Uptime kuma is a fantastic self hosted monitoring tool. One docker run command and you are up and running. Once you are in you have full control over checking status of urls, frequency, allowed timeouts, and a HUGE list of notification providers I deployed it in my homelab today.
kv - Command | Vault | HashiCorp Developer The "kv" command groups subcommands for interacting with Vault's key/value secret engine. kv - Command | Vault | HashiCorp Developer · developer.hashicorp.com hashi vault lets you manage secrets right from your cli.
GitHub - johanhaleby/kubetail: Bash script to tail Kubernetes logs from multiple pods at the same time Bash script to tail Kubernetes logs from multiple pods at the same time - johanhaleby/kubetail GitHub · github.com Kubetail is a pretty sick bash script that allows you to tail logs for multiple pods in one stream. Very handy when you have more than one replica running. Now with kubetail I can tail all the logs for every shot-wayl-one pod in the shot namespace.
I am converting my docker compose env secrets over to k8s secrets. This guide was clear and to the point how I can replicate this exact workflow. First set the secret, the easiest way is to use kubectl wtih –from-literal because it automatically base64 encodes for you. If you don’t use the you will have to base64 encode it. Once you have your secret deployed, you have to update the container spec in your deployment manifest to get the valueFrom secretKeyRef.
waylon walker (@_WaylonWalker) on X Which is more complicated X (formerly Twitter) · twitter.com Wow, shocked at these results. All this time I’ve been told and believed that k8s is incredibly hard, and you need a $1M problem before you think about it because it will take a $1M team to maintain it. So far my experience has been good, and I definitely do not have a $1M problem in my homelab.