Se rendre au contenu

Hatch presentation

Meet-up
26 novembre 2025 par
Hatch presentation
WebScIT, Collonval Frédéric

In April, the Python Rennes community gathered for an enlightening meet-up on Python packaging. I was given the opportunity to present the Hatch Library and its plugin capabilities.

You can directly look at the presentation (in French 🇫🇷) or keep reading for a summary.

Introduction to Hatch Library 

The presentation kicked off with a brief introduction to the Hatch Library, a modern Python project manager known for its extensibility and powerful plugin system. The speaker highlighted Hatch’s core features, including environment management, project management, and its customizable plugin architecture.

Focus of the Presentation

The main focus of the presentation was on creating Hatch plugins, specifically for:

  1. Version bump: Hatch can grab and update Python package version from arbitrary source through plugin.
  2. Extracting Metadata: This part focused on a plugin development that can extract metadata from Python packages. This includes information such as package name, dependencies, and more.
  3. Build system: Another key aspect was generating code for a microservice defined by an OpenAPI specification. A plugin to generate the code of a microservice was also presented ensuring consistency and reducing manual coding efforts.

Step-by-Step Plugin

Development The presentation provided a step-by-step guide to developing these plugins:

  1. 1. **Setting Up the Environment**: Attendees were shown how to set up their development environment using Hatch, ensuring all necessary dependencies were in place.
  2. 2. **Creating the Plugin Skeleton**: The speaker walked through the process of creating a basic plugin skeleton, including defining entry points and configuring the plugin.
  3. 3. **Implementing Metadata Extraction**: The demonstration included writing the code to extract package metadata, utilizing Python’s built-in libraries and Hatch’s plugin API.
  4. **Integrating with the Microservice**: The speaker showcased how to connect the plugin to a microservice using an OpenAPI specification, enabling automatic code generation based on the service’s endpoints.

#### Real-World Applications

To illustrate the practical applications of these plugins, the speaker shared several real-world examples:

  • - **Automated Documentation**: Using the metadata extraction plugin to generate comprehensive documentation for Python projects.
  • - **Consistent Code Generation**: Leveraging the code generation plugin to maintain consistency across multiple projects, especially in large teams or open-source contributions.

#### Interactive Demonstration

The highlight of the presentation was an interactive demonstration, where attendees had the opportunity to: 

  • Create their own Hatch plugins from scratch. 
  • Experiment with extracting metadata from various Python packages.
  • Generate code using a sample microservice defined by an OpenAPI specification. 

This hands-on session provided valuable insights into the practical use of Hatch plugins, leaving the audience inspired to explore further.

Conclusion

The Python Rennes meet-up offered attendees a comprehensive overview of creating powerful and customizable plugins for Hatch. As the Python community continues to evolve, events like these play a crucial role in fostering knowledge sharing and collaboration. We look forward to more sessions in the future, big thanks to Luc Sorel-Giffo for the organization! And do not hesitate to look at the other presentations (in French 🇫🇷) by Florian Strzelecki​ and Nicolas Ledez.


Hatch presentation
WebScIT, Collonval Frédéric 26 novembre 2025
Partager cet article
Étiquettes
Archive
What a first year