The Only 5 Python Libraries You Need for Automation (Stop Installing Everything)

I've seen it too many times. Someone wants to build a simple bot, and the first thing they do is install 47 different libraries. Pandas, numpy, matplotlib, seaborn, scipy, tensorflow "just in case" — and half of them never get used.

Stop.

You're making your life harder for no reason. For 90% of automation tasks, you need exactly 5 libraries. Everything else is optional until you actually need it.

Here are the only ones I install on every new VPS:

1. requests (API Calls)

Yes, I know about httpx and aiohttp. They're great. But requests is good enough for 99% of API work, and every Python developer already knows it.

import requests

response = requests.get('https://api.binance.com/api/v3/ticker/price?symbol=BTCUSDT')
data = response.json()
price = float(data['price'])

That's it. No async complexity, no extra dependencies. Just works.

When to skip: If you're making 1000+ requests per minute, consider httpx for connection pooling. Otherwise, requests is fine.

2. schedule (Timing)

Instead of writing complex cron jobs or threading nonsense, just use schedule. It's human-readable and perfect for bots.

import schedule
import time

def check_price():
    print("Checking price...")

schedule.every(5).minutes.do(check_price)

while True:
    schedule.run_pending()
    time.sleep(1)

Want it to run every day at 9 AM? schedule.every().day.at("09:00").do(job). Done.

No cron syntax to memorize. No system dependencies. Python handles everything.

3. python-dotenv (Secrets)

Never hardcode API keys. Ever. I learned this the hard way when I accidentally pushed a key to GitHub and got a very angry email from Binance.

from dotenv import load_dotenv
import os

load_dotenv()

API_KEY = os.getenv('BINANCE_API_KEY')
API_SECRET = os.getenv('BINANCE_SECRET')

Create a .env file, add it to .gitignore, and sleep peacefully knowing your keys aren't on GitHub.

4. logging (Debugging)

Print statements are fine until your bot runs for 3 days, crashes at 2 AM, and you have no idea what happened because the terminal closed.

import logging

logging.basicConfig(
    filename='bot.log',
    level=logging.INFO,
    format='%(asctime)s - %(message)s'
)

logging.info('Bot started')
logging.error('Something broke')

Now you have a permanent record. When things go wrong (and they will), you'll know exactly when and why.

5. sqlite3 (Data)

You don't need PostgreSQL for a bot that tracks 100 trades. SQLite is a file, requires zero setup, and is built into Python.

import sqlite3

conn = sqlite3.connect('trades.db')
c = conn.cursor()
c.execute('''CREATE TABLE IF NOT EXISTS trades
             (id INTEGER PRIMARY KEY, symbol TEXT, price REAL, time TEXT)''')
conn.commit()

It's not "web scale." It's not "enterprise grade." But for personal bots and small projects? Perfect.

What I Don't Install (And Why)

Pandas: Overkill for simple data. If you're just storing prices and timestamps, you don't need DataFrames.

NumPy: Unless you're doing heavy math, skip it. Regular Python lists are fine for 99% of bot logic.

Matplotlib: Cool for charts, but do you really need to visualize everything? I log data and only visualize when something looks weird.

SQLAlchemy: If you're using SQLite (which you should for small projects), raw SQL is simpler and more obvious.

My Minimal Requirements.txt

requests==2.31.0
schedule==1.2.0
python-dotenv==1.0.0

That's it. Everything else (logging, sqlite3) is already in Python's standard library.

My bots deploy in under 30 seconds because there's barely anything to install.

The Philosophy

Every library is a dependency. Every dependency is a potential failure point. Someone else's code breaking can break your bot.

Start minimal. Add complexity only when you hit a wall that standard libraries can't solve.

Most bots fail because of over-engineering, not under-engineering.


Agree? Disagree? Think I'm wrong about pandas? Let me know @ZayJII. Always happy to argue about Python.

🧑‍💻

Written by ZayJII

Python minimalist. I believe in less code, fewer dependencies, and things that actually work. Currently running 4 bots on 5 libraries total.