Python Xlsx Edit Library
Started working on a library to edit xlsx files that does not break formatting (unlike openpyxl). I was surprised that there aren't any better libraries out there for python. Learnt the structure from python-docx and ppt from scanny, parts factory and using lxml to do surgical edits.
I will try to make it into a public library.
Research on Python Library:
Todos:
- Find a name that is not taken on pypi
- Create a new repository on GitHub
- Register on PyPI early on
- License
- While the API is still evolving, stay in 0.x — under SemVer, 0.x signals "anything may change."
- GitHub Actions CI to run automated tests
Licenses:
1. Permissive (MIT, BSD, Apache-2.0)
Do anything — including use in closed/commercial products — as long as they keep your copyright notice. No obligation to share changes, no obligation to pay.
- MIT / BSD: minimal, do-what-you-want.
- Apache-2.0: same freedom + an explicit patent grant and trademark protection (companies often prefer it).
Monetization: none built in. You can only ask for voluntary donations (GitHub Sponsors).
2. Copyleft / reciprocal (LGPL, GPL, AGPL)
Free to use, but derivatives must also be open-sourced under the same license.
- LGPL: library-level. They can link your library into closed software freely; only changes to your library itself must be shared. Weak lever.
- GPL: strong. Any software that includes your code must be GPL (open). But it has the "SaaS loophole" — running it on a server isn't "distribution," so SaaS companies use GPL code privately without sharing.
- AGPL: GPL plus it closes the SaaS loophole — if a company uses it in a network service, they must open-source their whole service. This is the strongest lever short of a proprietary license.
3. Source-available (BSL, FSL, SSPL, PolyForm)
The source is public, but the license restricts commercial/production/competitive use. ⚠️ These are NOT "open source" by the official (OSI) definition.
- BSL (Business Source License): free for most uses, restricts production use, and auto-converts to open source after N years (MariaDB, Sentry).
- FSL / Fair Source: free except to compete with you; converts to permissive after ~2 years.
- PolyForm family: e.g. PolyForm Small Business is free for small companies (under revenue/employee thresholds) and paid for large ones — which is close to your "big pay more" idea, built into the license text.
CLA (Contributor License Agreement)
is a short agreement an outside contributor signs before you merge their pull request. It grants you the rights to their contribution.
I think I'll choose open source Apache-2.0 with CLA for the license with donations.
## Preparing for PyPI:
pyproject.toml
single central config file for your Python project (defined by PEP 517/518/621).
- Build tools (how to build the package)
- PyPI (the metadata shown on your project page + used by pip)
- Local dev tools (pytest, etc.)
Trove classifiers: PyPI uses them for search/filtering (Python versions, Dev Status, OS, topic)
py.typed marker: indicates that the package is type-hinted.
twine
Twine is a tool for publishing packages to PyPI.
Optional TestPyPI rehearsal
Make sure all APIs have a good naming, changing later will be a pain.
## Releasing to PyPI
- In Pypi publishing Add a new pending publisher
- Create a new release on GitHub
- Using Github Actions, build the package and it can automatically upload it to PyPI
I successfully released the package to PyPI xlsxedit
I am also making a website for the library
As I might be making more libraries, I need a way to manage them all in one place.
One app, many subdomains, routed by the Host header — plus a landing subdomain that lists all my libraries.