<?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>Forem: Ali Esmaeili</title>
    <description>The latest articles on Forem by Ali Esmaeili (@aliesm-com).</description>
    <link>https://forem.com/aliesm-com</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%2F2008759%2F6dd26587-6dc8-48c9-baa4-cd95317f3626.jpg</url>
      <title>Forem: Ali Esmaeili</title>
      <link>https://forem.com/aliesm-com</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/aliesm-com"/>
    <language>en</language>
    <item>
      <title>Zakaz: Auto-Generate index.ts Files for Cleaner Imports in Your Project</title>
      <dc:creator>Ali Esmaeili</dc:creator>
      <pubDate>Tue, 20 May 2025 08:23:15 +0000</pubDate>
      <link>https://forem.com/aliesm-com/zakaz-auto-generate-indexts-files-for-cleaner-imports-in-your-project-2j0l</link>
      <guid>https://forem.com/aliesm-com/zakaz-auto-generate-indexts-files-for-cleaner-imports-in-your-project-2j0l</guid>
      <description>&lt;p&gt;Managing imports and exports in JavaScript/TypeScript projects can quickly become messy — especially as your codebase scales. That’s where &lt;strong&gt;Zakaz&lt;/strong&gt; comes in.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F3n30xlz3p4o8hbukfcuc.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F3n30xlz3p4o8hbukfcuc.jpeg" alt="Illustration of Zakaz CLI tool with a clean UI showing an auto-generated index.ts file, designed to simplify JavaScript and TypeScript project structure." width="800" height="533"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Zakaz is a lightweight CLI tool that automatically creates index.ts or index.js files for each folder in your project, streamlining the way you import and export modules. It helps you avoid repetitive and error-prone manual exports, making your code cleaner and more maintainable.&lt;/p&gt;

&lt;h3&gt;
  
  
  🔧 What Does Zakaz Do?
&lt;/h3&gt;

&lt;p&gt;Zakaz recursively walks through your project directories, identifies all eligible files (typically .ts, .tsx, .js, or .jsx), and generates corresponding index.ts or index.js files that re-export them. This allows you to simply import a folder instead of specifying each file individually.&lt;/p&gt;

&lt;h3&gt;
  
  
  ✅ Before Zakaz
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import Button from './components/ui/Button';
import Input from './components/ui/Input';
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  ✅ After Zakaz
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import { Button, Input } from './components';
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  🚀 Installation
&lt;/h3&gt;

&lt;p&gt;To install Zakaz globally or as a dev dependency:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;npm install @navidmnzh/zakaz-cli
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;To run it instantly using npx:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;npx zakaz
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  🛠️ CLI Options
&lt;/h3&gt;

&lt;p&gt;Zakaz supports several useful flags:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;
+-------------------------------------------------------------------------+------+
| Description | Flag |
+-------------------------------------------------------------------------+------+
| Base path to start scanning from (default is .) | -b |
| Comma-separated list of directories to ignore (e.g., node_modules,dist) | -d |
| Show detailed logs during the generation process | -l |
+-------------------------------------------------------------------------+------+
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Example:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;npx zakaz -b . -d node_modules,build -l
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  📁 Project Structure
&lt;/h3&gt;

&lt;p&gt;Zakaz’s repository is cleanly organized:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;src/: Contains the core logic (directory walker, export generator)&lt;/li&gt;
&lt;li&gt;bin/: Command-line entry point&lt;/li&gt;
&lt;li&gt;tsconfig.json: TypeScript configuration&lt;/li&gt;
&lt;li&gt;package.json: Metadata and dependencies&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  💡 Why Use Zakaz?
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Reduces boilerplate&lt;/strong&gt; : No more repetitive export statements in every folder.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Prevents human error&lt;/strong&gt; : Automatically manages module exports, reducing mistakes.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Improves scalability&lt;/strong&gt; : Keeps your import paths consistent and clean as the project grows.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Cross-compatible&lt;/strong&gt; : Works with both JavaScript and TypeScript.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  🚧 A Few Considerations
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;The tool is actively maintained and may receive additional features in future.&lt;/li&gt;
&lt;li&gt;Documentation is minimal but the codebase is readable and well-structured.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  🧠 Final Thoughts
&lt;/h3&gt;

&lt;p&gt;Zakaz might be small, but its impact is significant — especially for growing codebases. If you’re tired of managing index.ts files manually or want to enforce cleaner architecture in your project, give Zakaz a shot.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;You can check out the GitHub repository here:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;📦 &lt;a href="https://github.com/navidmadannezhad/zakaz" rel="noopener noreferrer"&gt;Zakaz on GitHub&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;📁 &lt;a href="https://www.npmjs.com/package/@navidmnzh/zakaz-cli" rel="noopener noreferrer"&gt;Zakaz CLI on NPM&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  🙏 Credits
&lt;/h3&gt;

&lt;p&gt;Special thanks to &lt;strong&gt;Navid Madannezhad&lt;/strong&gt; for creating and sharing this useful tool with the developer community. Zakaz is a great example of how small utilities can make a big difference in day-to-day development.&lt;/p&gt;

</description>
      <category>programming</category>
      <category>typescript</category>
      <category>javascript</category>
      <category>react</category>
    </item>
    <item>
      <title>perfometrics: A Lightweight Python Package for URL Performance Metrics</title>
      <dc:creator>Ali Esmaeili</dc:creator>
      <pubDate>Sun, 18 May 2025 07:57:50 +0000</pubDate>
      <link>https://forem.com/aliesm-com/perfometrics-a-lightweight-python-package-for-url-performance-metrics-4dbn</link>
      <guid>https://forem.com/aliesm-com/perfometrics-a-lightweight-python-package-for-url-performance-metrics-4dbn</guid>
      <description>&lt;p&gt;In the world of software performance and DevOps, having fast, actionable insights into your web service response times is critical. While there are heavy-duty monitoring tools available, sometimes you just want something dead-simple to test how a specific URL is performing —  &lt;strong&gt;that’s where&lt;/strong&gt;  &lt;strong&gt;perfometrics comes in.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fs976blm7v9f6929arttf.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fs976blm7v9f6929arttf.jpeg" alt="Dark-themed banner showing the word ‘perfometrics’ with the subtitle ‘A Lightweight Python Package for URL Performance Metrics’ on the left, and a performance chart with rising bars and a Python logo on the right." width="800" height="533"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  🔍 What is perfometrics?
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://pypi.org/project/perfometrics/" rel="noopener noreferrer"&gt;perfometrics&lt;/a&gt; is a minimalistic Python package that lets you &lt;strong&gt;measure performance metrics for any HTTP/HTTPS URL&lt;/strong&gt; , using nothing more than a couple of lines of code.&lt;/p&gt;

&lt;p&gt;It’s built on top of pycurl, providing a clean API to track:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;HTTP status code&lt;/li&gt;
&lt;li&gt;DNS resolution time&lt;/li&gt;
&lt;li&gt;TCP connection time&lt;/li&gt;
&lt;li&gt;SSL/TLS handshake time&lt;/li&gt;
&lt;li&gt;Time to First Byte (TTFB)&lt;/li&gt;
&lt;li&gt;Data transfer time&lt;/li&gt;
&lt;li&gt;Total request time&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  ⚙️ Installation
&lt;/h3&gt;

&lt;p&gt;You can install it directly from PyPI:‍&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;pip install perfometrics
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  🚀 How to Use It
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import perfometrics.curl as pcurl

url = 'https://example.com'
curl_uptime = pcurl.CurlUptime(url)
metrics = curl_uptime.get_metrics()

print('Metrics for', url)
print('HTTP status code:', metrics['status_code'])
print('Time taken for DNS resolution:', metrics['dns_lookup'], 'seconds')
print('Time taken for establishing TCP connection:', metrics['tcp'], 'seconds')
print('Time taken for SSL/TLS handshake:', metrics['ssl_tls'], 'seconds')
print('Time to First Byte (TTFB):', metrics['ttfb'], 'seconds')
print('Time taken for data transfer:', metrics['data_transfer'], 'seconds')
print('Total time taken for request:', metrics['total'], 'seconds')

curl_uptime.close_session()
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;✅ The result gives you a breakdown of where your time is being spent in the connection process — ideal for debugging latency issues or verifying optimizations.&lt;/p&gt;

&lt;h3&gt;
  
  
  💡 Use Cases
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;DevOps Monitoring&lt;/strong&gt; : Benchmark your production endpoints periodically&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;CI/CD Testing&lt;/strong&gt; : Run it in your pipelines to ensure APIs respond within acceptable limits&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Data Collection&lt;/strong&gt; : Log metrics over time and analyze performance trends&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Lightweight Health Checks&lt;/strong&gt; : Build quick health monitors using this package&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  📦 What’s Inside
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;A single class: CurlUptime&lt;/li&gt;
&lt;li&gt;One method: .get_metrics() returns a dictionary of timing values&lt;/li&gt;
&lt;li&gt;Optional: .close_session() to clean up the curl handler&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;No need for extra config or YAMLs. Just import and measure.&lt;/p&gt;

&lt;h3&gt;
  
  
  📁 Source Code &amp;amp; Documentation
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;🔗 GitHub: &lt;a href="https://github.com/aliesm-com/perfometrics" rel="noopener noreferrer"&gt;https://github.com/aliesm-com/perfometrics&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;📦 PyPI: &lt;a href="https://pypi.org/project/perfometrics/" rel="noopener noreferrer"&gt;https://pypi.org/project/perfometrics/&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  🧠 Final Thoughts
&lt;/h3&gt;

&lt;p&gt;If you’re looking for a dead-simple way to collect performance metrics for your URLs in Python, without setting up a full observability stack, give perfometrics a try.&lt;/p&gt;

&lt;p&gt;If you like it, I’d appreciate a ⭐ on GitHub, and feel free to submit issues or PRs with ideas!&lt;/p&gt;

</description>
      <category>pypi</category>
      <category>performance</category>
      <category>python</category>
      <category>loggingandmonitoring</category>
    </item>
  </channel>
</rss>
