fastapi-azure-auth
pytudes
fastapi-azure-auth | pytudes | |
---|---|---|
17 | 100 | |
390 | 22,397 | |
2.1% | - | |
7.6 | 8.3 | |
about 1 month ago | 11 days ago | |
Python | Jupyter Notebook | |
MIT License | MIT License |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
fastapi-azure-auth
-
FastUI: Build Better UIs Faster
I'm under the impression that you work for a company that sells services related to FastAPI? https://github.com/Intility/fastapi-azure-auth
I maintain an open source library in my spare time for free, that you are welcome to ignore if you find better alternatives.
- Implement AzureAD in 10 minutes with FastAPI-Azure-Auth - full tutorial in the documentation
-
FastAPI Azure Auth đź”’ Now supports B2C (as well as single- and multi-tenant applications)
The documentation has a full tutorial in “Tiangolo-style”, which means it guided through setting up a project from scratch, and how to configure Azure appregs from scratch.
-
Ask HN: Good Python projects to read for modern Python?
I think, in general, most FastAPI and Pydantic related libraries are heavily typed, use poetry, GitHub pipelines, black, isort, flake8 etc. so if you want to look at the ecosystem around a package I’ll recommend a few here, that has a smaller scope than the huge libraries Pydantic/FastAPI are. All packages listed below has all these things.
FastAPI-Azure-Auth [0] is a library to do authentication and authorization through Azure AD using tokens.
ASGI—Correlation-ID[1] is a package that utilizes contextvars to store information through the asyncio stack, in order to attach correlation/request ID to every log message from a request. Available for Django in [2].
Pydantic-factories [3] is an awesome library to mock data for your pydantic models.
[0] https://github.com/Intility/fastapi-azure-auth
-
OAuth2 authorization with other flows beyond password.
If you want to use an external auth provider, I have written a library called FastAPI-Azure-Auth for authentication and authorization using Azure AD (which is free for something like 10.000 users). The tutorial should get you up and running quickly. Please note that this library is only intended to use for APIs (such as I sing a SPA frontend), so if you use jinja templates or render HTML from FastAPI this might not be the solution for you.
-
FastAPI Azure AD Authentication đź”’ Now supports both single- and multi-tenants applications
Hi! I’m the author of FastAPI-Azure-Auth, a package to handle Azure AD authentication and authorization for your FastAPI APIs. It’s a heavily tested package, supports trio, and the documentation has a full tutorial on how to set up both Azure and FastAPI from scratch.
-
Tips for Making a Popular Open-Source Project in 2021 [Ultimate Guide]
I agree with you. Most my packages are around ~100 stars, and I'm met with a lot of respect and appreciatio.n[1][2]
My library for Correlation-IDs in Django[3] got implemented by AWX, which also was a nice experience![4] I maintain a lot of small packages, and maybe it is the Django/FastAPI community, but "you'll get a load of entitled users" is straight up not true in my experience.
[1] https://github.com/Intility/fastapi-azure-auth/issues/24
-
Show HN: Implement Azure AD auth for your FastAPI
The documentation[1] contains a full tutorial on how to configure Azure AD and FastAPI for both single- and multi-tenant applications. It includes examples on how to lock down your APIs to certain scopes, tenants, roles etc.
[1] https://intility.github.io/fastapi-azure-auth/)
- Azure AD authentication for FastAPI đź”’ Now supports both single- and multi-tenants. Documentation includes a full tutorial on how to set it up from scratch
- Azure AD authentication đź”’ Now supports both single- and multi-tenants, and has a full setup tutorial for both FastAPI and Azure.
pytudes
-
Ask HN: High quality Python scripts or small libraries to learn from
Peter Norvig's work is great to learn from https://github.com/norvig/pytudes
- Norvig's 2023 Advent of Code
- Ask HN: How to build mastery in Python?
- SQL for Data Scientists in 100 Queries
- Bicycling Statistics
-
Ask HN: How to deal with the short vs. long function argument
I've been a programmer for 25 years. A realization that has crept up on me in the last 5 is that not everyone thinks that functions should be short: there are two cultures, with substantial numbers of excellent programmers belonging to both. My question is: how do we maintain harmonious, happy, and productive teams when people can disagree strongly about this issue?
The short-functions camp holds that functions should be short, tend toward the declarative, and use abstraction/implementation-hiding to increase readability (i.e. separable subsections of the function body should often be broken out into well-named helper functions). As an example, look at Peter Norvig's beautiful https://github.com/norvig/pytudes. For a long time I thought that this was how all "good programmers" thought code should be written. Personally, I spent over a decade writing in a dynamic and untyped language, and the only way that I and my colleagues could make that stuff reliable was to write code adhering to the tenets of the short-function camp.
The long-functions camp is, admittedly, alien to me, but I'll try to play devil's advocate and describe it as I think its advocates would. It holds that lots of helper functions are artificial, and actually make it _harder_ to read and understand the code. They say that they like "having lots of context", i.e. seeing all the implementation in one long procedural flow, even though the local variables fall into non-interacting subsets that don't need to be in the same scope. They hold that helper functions destroy the linear flow of the logic, and that they should typically not be created unless there are multiple call sites.
The short-function camp also claims an advantage regarding testability.
Obviously languages play a major role in this debate: e.g. as mentioned above, untyped dynamic languages encourage short functions, and languages where static compilation makes strong guarantees regarding semantics at least make the long-function position more defensible. Expression-oriented and FP-influenced languages encourage short functions. But it's not obvious, e.g. Rust could go both ways based on the criteria just mentioned.
Anyway, more qualified people could and have written at much greater length about the topic. The questions I propose for discussion include
- Is it "just a matter of taste", or is this actually a more serious matter where there is often an objective reason for discouraging the practices of one or other camp?
- How can members of the different camps get along harmoniously in the same team and the same codebase?
-
Pytudes
I have the same impression. Reading the code, he uses global variables [1], obscure variable (k, bw, fw, x) and module names ("pal.py" instead of "palindromes.py"), doesn’t respect conventions about naming in general (uppercase arguments [2], which even the GitHub syntax highlighter is confused about). This feels like code you write for yourself to play with Python and don’t plan to read later.
Some parts of the code feel like what I would expect from a junior dev who started learning the language a couple weeks ago.
[1]: https://github.com/norvig/pytudes/blob/952675ffc70f3632e70a7...
[2]: https://github.com/norvig/pytudes/blob/952675ffc70f3632e70a7...
- Ask HN: Where do I find good code to read?
-
Using Prolog in Windows NT Network Configuration (1996)
Prolog is excellent for bikeshedding, in fact that might be its strongest axis. It starts with everything you get in a normal language such as naming things, indentation, functional purity vs side effects, where to break code into different files and builds on that with having your names try to make sense in declarative, relational, logical and imperative contexts, having your predicates (functions) usable in all modes - and then performant in all modes - having your code be deterministic, and then deterministic in all modes. Being 50 years old there are five decades of learning "idiomatic Prolog" ideas to choose from, and five decades of footguns pointing at your two feet; it has tabling, label(l)ing, SLD and SLG resolution to choose from. Built in constraint solvers are excellent at tempting you into thinking your problem will be well solved by the constraint solvers (it won't be, you idiot, why did you think that was a constraint problem?), two different kinds of arithmetic - one which works but is bad and one which mostly works on integers but clashes with the Prolog solver - and enough metaprogramming that you can build castles in the sky which are very hard to debug instead of real castles. But wait, there's more! Declarative context grammars let you add the fun of left-recursive parsing problems to all your tasks, while attributed variables allow the Prolog engine to break your code behind the scenes in new and interesting ways, plenty of special syntax not to be sneezed at (-->; [_|[]] {}\[]>>() \X^+() =.. #<==> atchoo (bless you)), a delightful deep-rooted schism between text as linked lists of character codes or text as linked lists of character atoms, and always the ISO-Standard-Sword of Damocles hanging over your head as you look at the vast array of slightly-incompatible implementations with no widely accepted CPython-like-dominant-default.
Somewhere hiding in there is a language with enough flexibility and metaprogramming to let your meat brain stretch as far as you want, enough cyborg attachments to augment you beyond plain human, enough spells and rituals to conjour tentacled seamonsters with excellent logic ability from the cold Atlantic deeps to intimidate your problem into submission.
Which you, dear programmer, can learn to wield up to the advanced level of a toddler in a machine shop in a mere couple of handfuls of long years! Expertise may take a few lifetimes longer - in the meantime have you noticed your code isn't pure, doesn't work in all modes, isn't performant in several modes, isn't using the preferred idiom style, is non-deterministic, can't be used to generate as well as test, falls into a left-recursive endless search after the first result, isn't compatible with other Prolog Systems, and your predicates are poorly named and you use the builtin database which is temptingly convenient but absolutely verboten? Plenty for you to be getting on with, back to the drawing boar...bikeshed with you.
And, cut! No, don't cut; OK, green cuts but not red cuts and I hope you aren't colourblind. Next up, coroutines, freeze, PEngines, and the second 90%.
Visit https://www.metalevel.at/prolog and marvel as a master deftly disecting problems, in the same way you marvel at Peter Norvig's Pytudes https://github.com/norvig/pytudes , and sob as the wonders turn to clay in your ordinary hands. Luckily it has a squeaky little brute force searcher, dutifully headbutting every wall as it explores all the corners of your problem on its eventual way to an answer, which you can always rely on. And with that it's almost like any other high level mostly-interpreted dynamic programming / scripting language.
What are some alternatives?
full-stack-fastapi-template - Full stack, modern web application template. Using FastAPI, React, SQLModel, PostgreSQL, Docker, GitHub Actions, automatic HTTPS and more.
paip-lisp - Lisp code for the textbook "Paradigms of Artificial Intelligence Programming"
azure-functions-python-samples - Azure Functions Python Sample Codes. NOTE: The project, hosted in a repository, is no longer actively maintained by its creators or contributors. There won't be any further updates, bug fixes, or support from the original developers in the project.
asgi-correlation-id - Request ID propagation for ASGI apps
best-of-web-python - 🏆 A ranked list of awesome python libraries for web development. Updated weekly.
clerk - ⚡️ Moldable Live Programming for Clojure
uvicorn-gunicorn-fastapi-docker - Docker image with Uvicorn managed by Gunicorn for high-performance FastAPI web applications in Python with performance auto-tuning.
nbmake - đź“ť Pytest plugin for testing notebooks
PySimpleGUI - Python GUIs for Humans! PySimpleGUI is the top-rated Python application development environment. Launched in 2018 and actively developed, maintained, and supported in 2024. Transforms tkinter, Qt, WxPython, and Remi into a simple, intuitive, and fun experience for both hobbyists and expert users.
Installation - The premier source of truth powering network automation. Open source under Apache 2. Public demo: https://demo.netbox.dev
project-based-learning - Curated list of project-based tutorials