Me too, I'm convinced it has a place - the number of single file projects over the past few years can't be a coincidence.
For me the two missing pieces were models and a path to migrate to a full project once it outgrew a single file, so I wrote nanodjango (https://github.com/radiac/nanodjango/, formerly django-flasky) - you can use the ORM and admin site, and I recently added a "convert" command to automatically break up a single page app into a full Django project structure.
I've been using it for a couple of years for prototyping/experimenting and putting together small apps, and with the new features this year feels like it's a really practical alternative to flask.
Are you planning to add some kind of API serving functionality (either by integrating something like Django Ninja or even raw Pydantic)? I think such single file frameworks are great candidates to implement microservices.
Thanks! Yes definitely, I think it's a great fit for anything self-contained and limited scope that doesn't need a lot of code. I've certainly found having an easy way to run a single file using Django's ORM is pretty handy.
Regarding API serving, I'm planning on making it easier to use third party apps; the main obstacle is registering `includes` urls, which is doable at the moment but involves manually appending a path to `nanodjango.urls.urlpatterns`. I want to expand route registration to give a nicer internal api, then once that's in place Django Ninja should work pretty much out of the box - the only different should be how you register the url.
SEEKING WORK | UK | Remote | Python developer for 15+ years
I have been a Python and Django specialist for over 15 years, working as a full stack developer for 20 years and as a hands-on CTO for four at one of the UK's leading Python and Django consultancies.
Core technologies: Python, Django, JavaScript, Linux and container-based ops.
Skills: Project scoping and implementation, team building and management, technical strategy.
Most of my career has been in consultancy/agency environments where every project is different, so I have production experience working in a wide range of languages, libraries, frameworks and platforms in both frontend and backend - including Wagtail and DRF, React and htmx, and Docker and k8s.
I am available for one-offs, part-time, or long-term contracts, in either development or advisory roles. Take a look at my open source projects for a sample of my work, or get in touch for my full CV.
SEEKING WORK | UK | Remote | Lead developer/CTO contract
I have been a Python and Django specialist for 15 years, working as a full stack developer for over 20 years and as a hands-on CTO for the last four at one of the UK's leading Python and Django consultancies. I am immediately available for interviews, either for one-offs or long-term contracts.
Skills:
* Project scoping and estimating, team building, recruitment and resource management
* Directing technical strategies and solutions
* Implementation of anything from an MVP through to a production-ready deployment
* Advocating for code quality, linting, testing and documentation
* Comfortable working closely with clients
Technologies:
* Backend: Python, Django, DRF, htmx, Flask and FastAPI and more
SEEKING WORK | UK | Remote | Lead developer/CTO contract
I have been a Python and Django specialist for 15 years, working as a full stack developer for over 20 years and as a hands-on CTO for the last four at one of the UK's leading Python and Django consultancies. I am immediately available for interviews, either for one-offs or long-term contracts.
Skills:
* Project scoping and estimating, team building, recruitment and resource management
* Directing technical strategies and solutions
* Advocating for code quality, linting, testing and documentation
* Comfortable working closely with clients
Technologies:
* Backend: Python, Django, DRF, htmx, Flask and FastAPI and more
I self hosted for myself and some clients for years. As long as you set up everything correctly it's fairly pain-free, but it's definitely worth getting on as many abuse notification lists as you can find - I wasn't doing anything remotely spam-related but still got blacklisted by hotmail twice and some other places a couple of times; as I remember it getting cleared was just a case of jumping through a few hoops, but I still needed to find out about the problem before my clients did, and find the hoops to jump through (which was never easy).
I found the main issue was maintenance. Once it was set up it didn't need too much poking, but I was still responsible for my own downtime and backup, and every few years I'd need to move it to a new server. I ran a secondary relay so at least migrating without downtime was relatively easy, but it was still a multi-day process while I moved configurations, rules and mail across, waited to trust DNS propagation etc. And in the back of my mind if someone didn't reply in a timely manner, I couldn't ever stop wondering if I'd missed a blacklist somewhere, or if a provider had just decided to spambin everything from my IP.
The other pain point was that as it was a necessary service rather than something that generated profit, I didn't want to put any serious time into improving things for myself. That meant I was using IMAP+Thunderbird with whatever shonky open source webmail-du-jour I'd set up on the server that year, combined with various shell scripts and notes in wikis about how to manage users, forwarding rules etc. It worked, but it was never easy, and was never slick.
After I took a job where we all used gmail, I got used to things being easy and slick, and decided to stop self-hosting and move my mail to dedicated mail providers (fastmail and sendgrid in my case, ymmv). Haven't looked back.
Self hosting you mail is something I'd recommend doing once for fun to see how it all works, but unless you have a clear and definite reason to go it alone, it's definitely worth paying someone else to do it for you.
> As long as you set up everything correctly it's fairly pain-free
This is not true. Maybe you got it working for you (or maybe you never really measured your deliverability), but as a general advice that's just wrong. I've run my own email server for years and I've found it extremely difficult to get deliverability to Outlook and Gmail. You won't even get access to their deliverability debugging tools unless you send large volumes of email. Perversely, a small-volume sender is more likely to be classified as spam than a large-volume sender.
Having an OS which boots from hardware is always a feature to me - no matter how badly you screw up your system, you just do a hard reset (boot holding R) and get a working OS and GUI. You can still patch it by defining a boot app, but the core system is always there, safe from mishap and malware.
And yes, the OS was starting to show its age (both graphically and with its cooperative multitasking) by the time Acorn was broken up, but at its peak it was miles ahead of the competition, and was definitely an under-appreciated pearl.
As you say, I'd prefer to run this sort of thing locally - half the point of running your own CA is that you have full control over it.
I wrote caman (https://github.com/radiac/caman), a bash script wrapper for openssl with what looks like a similar syntax to etcd-ca. I posted about it on HN a while back, but it now also supports SAN certificates and intermediate CAs.
Exactly - there's no need for a service like this when you can have self-signed certificates. Create a CA cert to distribute across your team, then use it to sign host, wildcard and SAN certs as needed. If you need to share your site with people who don't have your CA cert, it's time to get a real one.
In case it helps anyone, I wrote an openssl wrapper with a simple syntax to manage self-signed CAs: https://github.com/radiac/caman
I hadn't come across this when I wrote caman; from the looks of things caman is simpler to use, but missing a couple of features - alt hostname support for SAN certificates (which I'm adding at the moment and should be up later today) and ability to use a subsidiary certificate authority.
I wrote caman because I could never remember what to type, so it has simple syntax - 4 commands, to add a new host, sign, revoke and renew; the only argument they take are the hostname. Configuration is a one-off when setting up your CA - there are two openssl config files with sensible defaults based on openssl best practice, with a few values for you to customise, and some basic templating for caman to fill out later.
For me the two missing pieces were models and a path to migrate to a full project once it outgrew a single file, so I wrote nanodjango (https://github.com/radiac/nanodjango/, formerly django-flasky) - you can use the ORM and admin site, and I recently added a "convert" command to automatically break up a single page app into a full Django project structure.
I've been using it for a couple of years for prototyping/experimenting and putting together small apps, and with the new features this year feels like it's a really practical alternative to flask.