← Back to projectsAuthor & Maintainer
nanumber-py - Python Auto Number Library
Open Source · Solo · 2024 - Present
- Python
- SQLAlchemy
- FastAPI
- Django
- Flask
- PostgreSQL
- MySQL
- SQLite
1 / 2
My contributions
- Designed and developed the library from scratch
- Implemented configurable number templates
- Built sequential number generation with database-backed storage
- Implemented thread-safe and process-safe number generation
- Added support for multiple SQL databases
- Published and maintained the package on PyPI
- Used the library in the Sinzhing Fashion inventory system
Overview
Created and published a Python library for generating sequential business document and transaction numbers using configurable templates. The library was designed as a reusable solution for systems that need structured automatic numbering across different business workflows.
✦
Published as an open-source Python package
✦
Supports multiple Python web frameworks
✦
Concurrency-safe number generation
✦
Multiple SQL database support
Challenges
- Generating sequential numbers safely under concurrent requests
- Supporting different document-number formats across business systems
- Making the library reusable across different frameworks and databases
Solutions
- Built configurable templates for automatic number generation
- Used database-backed locking and sequence handling for concurrency safety
- Designed the library independently from specific web frameworks
- Added support for PostgreSQL, MySQL, and SQLite
Outcomes
- Created a reusable solution for automatic business document numbering
- Published the library as an open-source Python package
- Reused the library in a real inventory management system