Hi there 👋
Today, let's look into 8 Python repos that the top 1% of developers use (and those you have likely never heard of).
Ready?
How do we find the repos used by the top 1% of devs? 🔎
At Quira, we rank developers based on their DevRank.
In simple terms, DevRank uses Google’s PageRank algorithm to measure how important a developer is in open source based on their contributions to open source repos.
We thus look at the repos that the top 1% have starred. We then calculate the likelihood that the top 1% of developers will star a repo compared to the likelihood that the bottom 50% won’t.
Lastly, after a bit of hand-picking, we found our 8 final repos. 📊👇
Note: We use stars as a rough measure of usage. Whilst this method isn't perfect, we recognise it offers insight into the tools favoured by top developers.
These repos will be particularly useful when building projects with a robust backend.
If you are interested in working on building small apps, and you enjoy the applied AI side, we recommend you check out Creator Quests, an open-source challenge that rewards developers for creating cool GenerativeAI apps with ChatGPT, Claude, Gemini and more. 🙃 💰
The latest Creator Quest challenges you to build developer tools using Generative AI. To participate, simply sign up to Quira and head to Quests.
The current prize pool is $2048, and it will increase as more participants join! Click on the image below and give it a try! ⬇️
Enough about this; let's dive into our findings and how you can benefit from them! 👇
🕸️ aio-libs/yarl
The URL library you have never heard of
Why should you care? Yarl is designed for easy and efficient URL management and analysis in Python. It handles encoding and decoding, allowing you to create, analyze and modify URLs in a simple way.
Set up: pip install yarl
Example use case:
from yarl import URL
url = URL('https://www.python.org/~guido?arg=1#frag')
# All url parts: scheme, user, password, host, port, path, query and fragment are accessible by properties:
>>> url.scheme
'https'
>>> url.host
'www.python.org'
>>> url.path
'/~guido'
>>> url.query_string
'arg=1'
>>> url.query
<MultiDictProxy('arg': '1')>
>>> url.fragment
'frag'
https://github.com/aio-libs/yarl
🗃️ Suor/django-cacheops
Your new caching best friend
Why should you care? Django-cacheops is a Django application that uses Redis to provide advanced caching capabilities, including automatic query caching and event-based automatic caching. It can speed up Django applications by reducing data load and has features like function and view caching.
Set up: pip install django-cacheops
Example use case:
# Function caching
from cacheops import cached_as
@cached_as(Article, timeout=120)
def article_stats():
return {
'tags': list(Article.objects.values('tag').annotate(Count('id')))
'categories': list(Article.objects.values('category').annotate(Count('id')))
}
https://github.com/Suor/django-cacheops
👀 samuelcolvin/watchfiles
File watching and code reload in Python
Why should you care? Watchfiles are essential because they automatically reset your code every time you make a change. This means you won't have to restart your server every time you update your content. It is also very easy to install and work on different projects, making your development process smoother and more efficient.
Set up: pip install watchfiles
Example use case: watch
usage
from watchfiles import watch
for changes in watch('./path/to/dir'):
print(changes)
https://github.com/samuelcolvin/watchfiles
🧪 FactoryBoy/factory_boy
Test your Python apps with fake but realistic data
Why should you care? Factory_boy is a tool that helps you quickly create fake but realistic data to test your Python application. It's like having an assistant who can automatically create any test case you need. This makes it easier to check whether your application works well in different situations.
Set up: pip install factory_boy
Example use case:
class FooTests(unittest.TestCase):
def test_with_factory_boy(self):
# We need a 200€, paid order, shipping to australia, for a VIP customer
order = OrderFactory(
amount=200,
status='PAID',
customer__is_vip=True,
address__country='AU',
)
# Run the tests here
def test_without_factory_boy(self):
address = Address(
street="42 fubar street",
zipcode="42Z42",
city="Sydney",
country="AU",
)
customer = Customer(
first_name="John",
last_name="Doe",
phone="+1234",
email="john.doe@example.org",
active=True,
is_vip=True,
address=address,
)
# etc.
https://github.com/FactoryBoy/factory_boy
💽 hugapi/hug
Developing APIs as simple as possible.
Why should you care? Hug is a framework that easily creates APIs in Python and is designed to protect your code as much as possible. It is made for fast and self-documenting code support, making your development more intuitive.
Set up: pip3 install hug --upgrade
Example use case:
# Build an example API with a simple endpoint in just a few lines.
# filename: happy_birthday.py
"""A basic (single function) API written using hug"""
import hug
@hug.get('/happy_birthday')
def happy_birthday(name, age:hug.types.number=1):
"""Says happy birthday to a user"""
return "Happy {age} Birthday {name}!".format(**locals())
📑 joeyespo/grip
Preview GitHub README.md files locally before committing them.
Why should you care? Grip allows you to use GitHub's own Markdown API to create local Markdown archives (like a README) before pushing to GitHub. This is great for getting your files directly to GitHub without the trial and error of pushing and reviewing.
Set up: pip install grip
or for brew users brew install grip
Example use case:
# To render the readme of a repository
$ cd myrepo
$ grip
* Running on http://localhost:6419/
https://github.com/joeyespo/grip
🔎 joerick/pyinstrument
Find why and where your code is slow!
Why should you care? Pyinstrument is a performance analysis tool that helps you identify areas of your code that are slowing down your application. You can run your script as usual and get detailed information about where it spends the most time, helping you tune your code to be more efficient.
Set up: pip install pyinstrument
Example use case:
# Instead of writing python script.py, type pyinstrument script.py.
# Your script will run as normal, and at the end (or when you press ^C)
# Pyinstrument will output a colored summary showing where most of the time was spent.
# Pyinstrument also has a Python API. Just surround your code with Pyinstrument, like this:
from pyinstrument import Profiler
profiler = Profiler()
profiler.start()
# code you want to profile
profiler
.stop()
profiler.print()
https://github.com/joerick/pyinstrument
✍️ marshmallow-code/apispec
A pluggable API specification generator
Why should you care? Apispec is a tool for creating API documentation with specific support for the OpenAPI specification. This means it automatically creates a clear, structured document for your API endpoint.
Set up: pip install -U apispec
Example use case:
from apispec import APISpec
from apispec.ext.marshmallow import MarshmallowPlugin
from apispec_webframeworks.flask import FlaskPlugin
from flask import Flask
from marshmallow import Schema, fields
# Create an APISpec
spec = APISpec(
title="Swagger Petstore",
version="1.0.0",
openapi_version="3.0.2",
plugins=[FlaskPlugin(), MarshmallowPlugin()],
)
# Optional marshmallow support
class CategorySchema(Schema):
id = fields.Int()
name = fields.Str(required=True)
class PetSchema(Schema):
category = fields.List(fields.Nested(CategorySchema))
name = fields.Str()
# Optional security scheme support
api_key_scheme = {"type": "apiKey", "in": "header", "name": "X-API-Key"}
spec.components.security_scheme("ApiKeyAuth", api_key_scheme)
# Optional Flask support
app = Flask(__name__)
@app.route("/random")
def random_pet():
"""A cute furry animal endpoint.
---
get:
description: Get a random pet
security:
- ApiKeyAuth: []
responses:
200:
content:
application/json:
schema: PetSchema
"""
pet = get_random_pet()
return PetSchema().dump(pet)
# Register the path and the entities within it
with app.test_request_context():
spec.path(view=random_pet)
https://github.com/marshmallow-code/apispec
I hope our discoveries are valuable and will help you build a robust backend toolkit! ⚒️
If you want to leverage these tools today to earn rewards, we have just launched a challenge to build a developer tool using Generative AI.
If that's of interest, log into Quira and discover Quests! 💰
It's time to code, have fun and bag some awesome rewards. 🤘
Lastly, please consider supporting these projects by starring them. ⭐️
PS: We are not affiliated with them. We just think that great projects deserve great recognition.
See you next week,
Your Dev.to buddy 💚
Bap
If you want to join the self-proclaimed "coolest" server in open source 😝, you should join our discord server. We are here to help you on your journey in open source. 🫶
Top comments (16)
Very interesting!!🧐
Glad to hear you find it useful 🤘
Interesting !
Thank you for sharing.
Wow, so many new tools :)
🙏🙏
There are so many problems with the methodology identifying the top 1% of Python developers. It’s really disappointing that folks are still trying to rank one another in some sort of school-yard popularity contest.
No thanks.
Hey Mike, thanks for your comment. I see where you are coming from. On our end, we do believe some engineers have more experience than others, and we are trying to find a way to identify that. We recognise that our DevRank methodology is imperfect, and we are working daily to improve it. Still, I am very interested in your feedback on this. Can you develop your thoughts here? Thanks in advance 🙏
You all didn’t say “developers with the most experience,” you said “top 1% of developers.” Those are two very different things. Having experience is fine, I’ve got more than 25 years professional experience. I would never rank myself against other folks though, as there exists no objective measure of development as a discipline.
The problem with ranking people the way you are is that it has the effect of saying that they’re more correct than others, or are in some way an authority among other engineers in a general sense. That sort of thinking is fallacious and counterproductive. My 25 years doesn’t mean I’m going to always have the right answer, or always be more productive, and it certainly doesn’t mean I’m better than anybody.
Just stop ranking people.
Ah got it! The position we have is that not all developers are equal in the sense that some have had more impact than others. I agree with you that not every developer always has the right answer. As you said, despite 20-30+ years of experience, anyone can still be wrong. The way we look at it is that some devs have had really meaningful pieces of work in the open-source ecosystem, and in order to find which ones had more impact, you inevitably go into a ranking system. I still understand where you are coming from, and I want to thank you for taking the time to share your thoughts - I really appreciate it. 🙏
Yeah, it’s frustrating how you keep reframing what you actually said to be something different.
Thanks for letting us know about this part:
If you have worked with other OS backend projects which you think deserve a mention, please share it below. I'm super keen to read up on them 🌟👇
I want to know what is the total number of python developers who are in the top 1% 😉
Finally something for URLs, Yarl!!
and none of them are async