<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Md Mahmud Hasan</title>
    <description>The latest articles on DEV Community by Md Mahmud Hasan (@mahamudh472).</description>
    <link>https://dev.to/mahamudh472</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F2452510%2F4caf9047-526a-4da1-b84d-5b6638d90982.jpeg</url>
      <title>DEV Community: Md Mahmud Hasan</title>
      <link>https://dev.to/mahamudh472</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/mahamudh472"/>
    <language>en</language>
    <item>
      <title>Generate sitemaps automatically in django</title>
      <dc:creator>Md Mahmud Hasan</dc:creator>
      <pubDate>Wed, 19 Mar 2025 05:06:00 +0000</pubDate>
      <link>https://dev.to/mahamudh472/generate-sitemaps-automatically-in-django-3c4g</link>
      <guid>https://dev.to/mahamudh472/generate-sitemaps-automatically-in-django-3c4g</guid>
      <description>&lt;h2&gt;
  
  
  Understanding Sitemaps and Their Importance in Django
&lt;/h2&gt;

&lt;p&gt;A sitemap is an XML file that lists all the URLs of a website, helping search engines like Google efficiently crawl and index the site’s pages. It informs search engines about the structure of your site, including metadata like the last modification date and change frequency.  &lt;/p&gt;

&lt;h2&gt;
  
  
  Why Sitemaps Matter
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;SEO Improvement&lt;/strong&gt; – Helps search engines discover and index your pages faster.
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Better Crawl Efficiency&lt;/strong&gt; – Ensures search engines don’t miss important pages.
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Enhanced Visibility&lt;/strong&gt; – Improves ranking by making the site easier to navigate for bots.
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Automatic Updates&lt;/strong&gt; – Updates dynamically when new content is added.
&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Django and Sitemaps
&lt;/h2&gt;

&lt;p&gt;Django simplifies sitemap generation using the built-in &lt;code&gt;django.contrib.sitemaps&lt;/code&gt; framework. With minimal configuration, Django can automatically create a dynamic sitemap for your website.  &lt;/p&gt;

&lt;h3&gt;
  
  
  Key Benefits of Django's Sitemap Framework
&lt;/h3&gt;

&lt;p&gt;✔ &lt;strong&gt;No Manual Work&lt;/strong&gt; – Dynamically generates sitemaps for models like blogs, products, or any other content.&lt;br&gt;&lt;br&gt;
✔ &lt;strong&gt;Customizable&lt;/strong&gt; – You can define update frequency, priority, and filtering logic.&lt;br&gt;&lt;br&gt;
✔ &lt;strong&gt;Integration with Google&lt;/strong&gt; – Easily submit sitemaps to Google Search Console.&lt;br&gt;&lt;br&gt;
✔ &lt;strong&gt;Scalability&lt;/strong&gt; – Works well for both small and large-scale websites.  &lt;/p&gt;

&lt;p&gt;Since Django handles sitemap generation efficiently, developers don’t need to write complex logic to maintain it manually. Just configure it once, and Django keeps it up to date!  &lt;/p&gt;

&lt;p&gt;Django makes sitemap generation effortless, ensuring better SEO and faster indexing without manual work. With just a few configurations, your website can be search engine-friendly and scalable.  &lt;/p&gt;




&lt;p&gt;💬 &lt;strong&gt;Have you implemented sitemaps in Django before?&lt;/strong&gt; Share your thoughts or ask any questions in the comments!  &lt;/p&gt;

&lt;p&gt;🚀 &lt;strong&gt;Need Help with Django Development?&lt;/strong&gt;  &lt;/p&gt;

&lt;p&gt;I offer professional Django solutions, including:  &lt;/p&gt;

&lt;p&gt;✔ &lt;strong&gt;Custom Web Development&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
✔ &lt;strong&gt;SEO Optimization (including sitemaps)&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
✔ &lt;strong&gt;Performance &amp;amp; Security Enhancements&lt;/strong&gt;  &lt;/p&gt;

&lt;p&gt;🔗 &lt;strong&gt;Check out my Fiverr gigs:&lt;/strong&gt;  &lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;a href="https://lnkd.in/ggeaRX-N" rel="noopener noreferrer"&gt;Django Web Development&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://lnkd.in/gtBSBGWX" rel="noopener noreferrer"&gt;Custom web application&lt;/a&gt;
&lt;/li&gt;
&lt;/ol&gt;




&lt;h1&gt;
  
  
  Django #Python #WebDevelopment #SEO #Sitemaps #BackendDevelopment #Freelancing #Fiverr #DevCommunity #DjangoDeveloper #SoftwareDevelopment
&lt;/h1&gt;

</description>
    </item>
    <item>
      <title>Create a python package and publish.</title>
      <dc:creator>Md Mahmud Hasan</dc:creator>
      <pubDate>Wed, 08 Jan 2025 06:10:05 +0000</pubDate>
      <link>https://dev.to/mahamudh472/create-a-python-package-and-publish-1abp</link>
      <guid>https://dev.to/mahamudh472/create-a-python-package-and-publish-1abp</guid>
      <description>&lt;p&gt;Creating and publishing a Python package involves several steps. Below is the full cycle from starting to create a Python package to publishing it on PyPI (Python Package Index).&lt;/p&gt;

&lt;h3&gt;
  
  
  1. &lt;strong&gt;Prepare Your Package Directory Structure&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;Create a project directory with the necessary structure:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;my_package/
├── my_package/            # The package folder
│   ├── __init__.py        # Mark as a Python package
│   └── my_module.py       # Your module code
├── tests/                 # Unit tests
│   └── test_my_module.py
├── setup.py               # Package setup configuration
├── README.md              # Documentation for your package
├── LICENSE                # License file
└── requirements.txt       # List of dependencies (optional)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  2. &lt;strong&gt;Create Your Package Code&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;In the &lt;code&gt;my_package&lt;/code&gt; directory, create your Python code.&lt;/p&gt;

&lt;p&gt;For example, in &lt;code&gt;my_package/my_module.py&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;greet&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;name&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="sa"&gt;f&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Hello, &lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="n"&gt;name&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="s"&gt;!&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Then, in &lt;code&gt;my_package/__init__.py&lt;/code&gt;, make the package accessible by importing your module:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="kn"&gt;from&lt;/span&gt; &lt;span class="n"&gt;.my_module&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;greet&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  3. &lt;strong&gt;Write Unit Tests&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;In the &lt;code&gt;tests&lt;/code&gt; directory, create a test file &lt;code&gt;test_my_module.py&lt;/code&gt; to test your package:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;unittest&lt;/span&gt;
&lt;span class="kn"&gt;from&lt;/span&gt; &lt;span class="n"&gt;my_package&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;greet&lt;/span&gt;

&lt;span class="k"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;TestGreet&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;unittest&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;TestCase&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
    &lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;test_greet&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;self&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
        &lt;span class="n"&gt;self&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;assertEqual&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nf"&gt;greet&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;World&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Hello, World!&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;__name__&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt; &lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;__main__&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="n"&gt;unittest&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;main&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  4. &lt;strong&gt;Write the &lt;code&gt;setup.py&lt;/code&gt; File&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;The &lt;code&gt;setup.py&lt;/code&gt; file is used to define the package metadata and installation details.&lt;/p&gt;

&lt;p&gt;Create &lt;code&gt;setup.py&lt;/code&gt; at the root level of your project:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="kn"&gt;from&lt;/span&gt; &lt;span class="n"&gt;setuptools&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;setup&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;find_packages&lt;/span&gt;

&lt;span class="nf"&gt;setup&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="n"&gt;name&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;my_package&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;  &lt;span class="c1"&gt;# Name of your package
&lt;/span&gt;    &lt;span class="n"&gt;version&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;0.1&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;      &lt;span class="c1"&gt;# Version number
&lt;/span&gt;    &lt;span class="n"&gt;packages&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="nf"&gt;find_packages&lt;/span&gt;&lt;span class="p"&gt;(),&lt;/span&gt;  &lt;span class="c1"&gt;# Find all packages in the directory
&lt;/span&gt;    &lt;span class="n"&gt;install_requires&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;  &lt;span class="c1"&gt;# External dependencies (optional)
&lt;/span&gt;        &lt;span class="c1"&gt;# "requests",   # Uncomment to add external packages
&lt;/span&gt;    &lt;span class="p"&gt;],&lt;/span&gt;
    &lt;span class="n"&gt;test_suite&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;tests&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;  &lt;span class="c1"&gt;# Define the location of your tests
&lt;/span&gt;    &lt;span class="n"&gt;classifiers&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;
        &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Programming Language :: Python :: 3&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;License :: OSI Approved :: MIT License&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Operating System :: OS Independent&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="p"&gt;],&lt;/span&gt;
    &lt;span class="n"&gt;author&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Your Name&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;author_email&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;your.email@example.com&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;description&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;A simple package for greeting&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;long_description&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="nf"&gt;open&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;README.md&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nf"&gt;read&lt;/span&gt;&lt;span class="p"&gt;(),&lt;/span&gt;
    &lt;span class="n"&gt;long_description_content_type&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;text/markdown&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;url&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;https://github.com/yourusername/my_package&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;  &lt;span class="c1"&gt;# Replace with your repo URL
&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  5. &lt;strong&gt;Write the &lt;code&gt;README.md&lt;/code&gt; File&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;Create a &lt;code&gt;README.md&lt;/code&gt; file with some basic information about your package. This file will be displayed on your PyPI page.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight markdown"&gt;&lt;code&gt;&lt;span class="gh"&gt;# My Package&lt;/span&gt;

This is a simple Python package that greets users.

&lt;span class="gu"&gt;## Installation&lt;/span&gt;

To install the package, run:&lt;span class="sb"&gt;


&lt;/span&gt;pip install my_package
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Usage
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="kn"&gt;from&lt;/span&gt; &lt;span class="n"&gt;my_package&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;greet&lt;/span&gt;
&lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nf"&gt;greet&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;World&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt;  &lt;span class="c1"&gt;# Output: Hello, World!
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  6. &lt;strong&gt;Create a &lt;code&gt;LICENSE&lt;/code&gt; File&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;Choose a license for your package. A common choice is the MIT license. You can create a &lt;code&gt;LICENSE&lt;/code&gt; file with the following content:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;MIT License

Copyright (c) 2025 Your Name

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
...
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  7. &lt;strong&gt;Create &lt;code&gt;requirements.txt&lt;/code&gt; (Optional)&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;If your package has any external dependencies, list them in the &lt;code&gt;requirements.txt&lt;/code&gt; file:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;requests==2.25.1
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  8. &lt;strong&gt;Test Your Package Locally&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;Before publishing, it’s a good idea to test your package locally.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Install your package locally&lt;/strong&gt; by running:
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;   pip &lt;span class="nb"&gt;install&lt;/span&gt; &lt;span class="nt"&gt;-e&lt;/span&gt; &lt;span class="nb"&gt;.&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This installs the package in "editable" mode, meaning changes to the code will be reflected immediately.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Run your tests&lt;/strong&gt; to ensure everything is working:
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;   python &lt;span class="nt"&gt;-m&lt;/span&gt; unittest discover
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  9. &lt;strong&gt;Create a Source Distribution and Wheel&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;To prepare your package for publication, you need to create distribution archives (source tarball and wheel).&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Install &lt;code&gt;setuptools&lt;/code&gt; and &lt;code&gt;wheel&lt;/code&gt; if you haven't already:
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;   pip &lt;span class="nb"&gt;install &lt;/span&gt;setuptools wheel
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ol&gt;
&lt;li&gt;Run the following command to create the distributions:
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;   python setup.py sdist bdist_wheel
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This will create a &lt;code&gt;dist/&lt;/code&gt; folder containing &lt;code&gt;.tar.gz&lt;/code&gt; and &lt;code&gt;.whl&lt;/code&gt; files, which are the files that can be uploaded to PyPI.&lt;/p&gt;

&lt;h3&gt;
  
  
  10. &lt;strong&gt;Publish Your Package to PyPI&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;To upload your package to PyPI, you need to create an account on &lt;a href="https://pypi.org/" rel="noopener noreferrer"&gt;PyPI&lt;/a&gt;.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Install &lt;code&gt;twine&lt;/code&gt; to upload your package:
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;   pip &lt;span class="nb"&gt;install &lt;/span&gt;twine
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ol&gt;
&lt;li&gt;Upload the package to PyPI using &lt;code&gt;twine&lt;/code&gt;:
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;   twine upload dist/&lt;span class="k"&gt;*&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This will prompt you for your PyPI username and password. After authentication, your package will be uploaded.&lt;/p&gt;

&lt;h3&gt;
  
  
  11. &lt;strong&gt;Install Your Package from PyPI&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;Once your package is published, you can install it using &lt;code&gt;pip&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;pip &lt;span class="nb"&gt;install &lt;/span&gt;my_package
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h3&gt;
  
  
  12. &lt;strong&gt;Maintain Your Package&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;After publishing, you can update your package by:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Making changes to your code.&lt;/li&gt;
&lt;li&gt;Incrementing the version number in &lt;code&gt;setup.py&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Running the &lt;code&gt;python setup.py sdist bdist_wheel&lt;/code&gt; command again.&lt;/li&gt;
&lt;li&gt;Uploading the new version to PyPI using &lt;code&gt;twine upload dist/*&lt;/code&gt;.&lt;/li&gt;
&lt;/ol&gt;




&lt;h3&gt;
  
  
  Additional Tools and Tips:
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Tox&lt;/strong&gt;: For testing your package on multiple Python versions.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Sphinx&lt;/strong&gt;: For generating documentation.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Pytest&lt;/strong&gt;: As an alternative to &lt;code&gt;unittest&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Pre-commit hooks&lt;/strong&gt;: To ensure code quality and consistency before commits.&lt;/li&gt;
&lt;/ul&gt;

</description>
    </item>
  </channel>
</rss>
