pydantic
phonenumbers
| pydantic | phonenumbers | |
|---|---|---|
| 183 | 7 | |
| 26,209 | 3,690 | |
| 2.3% | 0.5% | |
| 9.8 | 8.5 | |
| 5 days ago | 5 days ago | |
| Python | Python | |
| MIT License | Apache License 2.0 |
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.
pydantic
- Python Design Patterns for Clean Architecture
Pydantic Documentation
- I built binary serializer for Pydantic models that's up to 7× smaller than JSON
Found in issue where maintainer answered that they are only going to support JSON
https://github.com/pydantic/pydantic/discussions/4097
- Dict Unpacking in Python
- A Practical Guide on Structuring LLM Outputs with Pydantic
The solution? Leverage Pydantic, a Python library that enables runtime data validation using type annotations.
- Loading Pydantic models from JSON without running out of memory
Pydantic author here. We have plans for an improvement to pydantic where JSON is parsed iteratively, which will make way for reading a file as we parse it. Details in https://github.com/pydantic/pydantic/issues/10032.
Our JSON parser, jiter (https://github.com/pydantic/jiter) already supports iterative parsing, so it's "just" a matter of solving the lifetimes in pydantic-core to validate as we parse.
This should make pydantic around 3x faster at parsing JSON and significantly reduce the memory overhead.
- Advanced Pydantic: Generic Models, Custom Types, and Performance Tricks
Across this five-post series, we’ve journeyed from Pydantic’s basics—type validation and nested models—to advanced integrations with FastAPI, SQLAlchemy, and scalable techniques. You’ve learned how to build declarative, type-safe models, handle complex APIs, and optimize performance. To deepen your knowledge, explore the Pydantic documentation, contribute to the open-source project, or experiment with real-world use cases. Check out our GitHub repo for code samples and a Pydantic cheat sheet. Thank you for joining us—happy coding!
- Getting Started with Pydantic: Type-Safe Data Models in Python
To dive deeper, check out the Pydantic documentation for advanced features like nested models, custom validators, and settings management. Happy coding!
- Resumindo características da linguagem Python
- FastAPI, Pydantic, Psycopg3: the holy trinity for Python web APIs
Pydantic is bundled with FastAPI and is excellent for modelling, validating, and serialising API responses.
- Pydantic Settings + AWS the easy way
Pydantic Settings is a python library that extends 🚀 Pydantic for dealing with settings management.
phonenumbers
- What are approaches for extracting phone numbers with different format from many sites?
Did you try https://github.com/daviddrysdale/python-phonenumbers? You'll still need country code to parse local formats though. How many sites do you have?
- Python: Data validation
Validating a phone number using phonenumbers
- My First Django Website
Oh that's good. I will add that to my project to do board. I also realized I need a better way to handle phone numbers. I got to figure out a way to set up autoformatting. Something like this
- Problem with validating phonenumbers. What widget to use when trying to validate a form field with phonenumber ?
I've use this pypi with some success (github).
- Does anyone know where I can find official docs for python-phonenumbers package?
This is the GitHub repo for the package.
- Is there a reliable free way to figure out what carrier a phone number belongs to?
The repo says it's a port of Google's libphonenumber and if we root around in there a bit we find the data for number->carrier mapping is here.
- Is there a function or api to determine the area code of the phone number?
Ports of it to Python like https://github.com/daviddrysdale/python-phonenumbers can get job done for you.
What are some alternatives?
msgspec - A fast serialization and validation library, with builtin support for JSON, MessagePack, YAML, and TOML
Python Left-Right Parser - Python Parser
pyparsing - Python library for creating PEG parsers
HaikunatorPY - Generate Heroku-like random names to use in your python applications
typeguard - Run-time type checker for Python
python-nameparser - A simple Python module for parsing human names into their individual components