SYSTEM NOTICE

Auto translation by AI. Be sure, accuracy, nuances and authorial intent may not be fully reflected.
見出し画像

[App Creation] A Record of Realizing Technological Progress: The Blazing Speed of uv and the Evolution of certbot [MCP]

Hello everyone who talks with generative AI!

The previous article was a follow-up where I learned the basic concepts of proxies.

This time, I actually proceeded from Apache configuration to building a Django API, and I was so moved by the progress of technology during that process that I decided to record it.

What I did this time (roughly)

Actually building the proxy configuration I understood last time:

  • Creating Apache (server) configuration files
    ⇒ Creating an entrance to interact with partners

  • Obtaining SSL certificates
    ⇒ Strengthening security around the entrance

  • Creating a Django API
    ⇒ Writing instructions for the partner on how to reply when the front door is knocked

  • Verifying actual API operation
    ⇒ Actually knocking on the front door to check if the partner replies properly

Setting aside the technical details, I will introduce two points that moved me to say, "Wait, has it become this easy?".

I was surprised by the evolution of certbot

Experience with existing sites

When I first built a server, after obtaining an SSL certificate, I
manually added settings for automatic renewal separately.

I used to struggle while Googling things like, "SSL certificates expire in 90 days, so I have to set up an automatic renewal schedule in crontab...".

This time's experience

However, this time, when I executed the following command:

sudo certbot --apache -d example.com

To my surprise, everything, including the automatic renewal settings, was completed at the same time as obtaining the certificate.

Certbot has set up a scheduled task to automatically renew this certificate in the background.

"Wait? It does the automatic renewal too?"

When I checked, the automatic renewal timer was indeed already set. The work I used to do manually has become fully automated before I knew it.

Realizing the progress of technology

I had no idea certbot had become this convenient in just a year or two. Even the same tools keep getting improved and becoming easier to use.

The tragedy of "forgetting the SSL certificate expiration and having the site go down..." seems like it will be a thing of the past.

Impressed by the speed and ease of use of uv

Memories of pip

Until now, pip was the go-to for installing Python packages. I remember that especially when installing Django, download information would clatter across the black screen, and I would have to wait for quite a while.

Collecting django==4.2.5
  Downloading Django-4.2.5-py3-none-any.whl (8.0 MB)
     ████████████████████████████████ 8.0/8.0 MB 2.1 MB/s 
Collecting sqlparse>=0.3.1
  Downloading sqlparse-0.4.4-py3-none-any.whl (41 kB)
...(延々と続く)

I think I used to wait about 5-10 seconds like this.

Meeting uv

Actually, yesterday I watched a video introducing a tool called uv and was impressed by how incredibly fast it was. So, I decided to use it right away for this MCP server setup.

bash

uv add django djangorestframework

Result: Finished in an instant.

The "clattering screen" of the pip era didn't appear at all, and before I knew it, the installation was complete. It was the same blazing-fast experience I saw in the video yesterday, and I couldn't help but exclaim, "Whoa!"

Virtual environment management is also revolutionary

What surprised me even more was the ease of use of virtual environments.
Managing virtual environments. Until now, it was like this:

python3 -m venv venv
source venv/bin/activate  # 仮想環境を有効化

pip install django
python manage.py runserver

With uv:

uv run python manage.py runserver

No need to worry about activating the virtual environment!

Previously, if you didn't run source venv/bin/activate beforehand,
additional features would be installed on the server itself,
or conversely, additional features wouldn't work, which was a hassle.

But with uv, you just add `uv run` before the additional feature,
and it executes the command in the appropriate environment without you having to worry about turning the virtual environment on or off.
Development without being conscious of the virtual environment is so comfortable.

The moving moment from 503 error to 200 OK

Finally, when I finished the series of settings and tested the API:

curl https://example.com/api/hello/

Execution result

{
  "message": "Hello from MCP Server!",
  "status": "running", 
  "ayana": "こんにちは!APIが動いています!"
}

The change from 503 Service Unavailable to 200 OK + JSON response.

The moment it finally responded with
Hello! after it had been 'Service Unavailable' for so long was truly moving.

Finally

Setting up the server for the first time in a while, I realized how fast technology is progressing.

The evolution of certbot: Manual tasks are now automated, making SSL certificate management even easier.

The arrival of uv: I never imagined the Python development environment could become this comfortable.

I realized once again that even for similar tasks, using new or improved tools can completely change the experience. While being grateful for technological progress, I felt the importance of constantly catching up on new information.

uv in particular is truly amazing, and for those who don't know it well yet, I think
this video will be very helpful. uv is really incredible...!

Next time, I plan to implement actual MCP server functions and build a conversation system with an AI partner.

I would like to summarize any progress or interesting discoveries in MCP server production in future articles, so I would be happy if you read them again.

See you next time!