Quick Start Guide¶
Get started with dbcreds in just a few minutes!
Installation¶
Initialize dbcreds¶
This creates the configuration directory and checks available backends.
Add Your First Environment¶
You'll be prompted for: - Database host - Port (defaults to 5432 for PostgreSQL) - Database name - Username - Password
Use in Python¶
from dbcreds import get_connection
import pandas as pd
# Get a connection
with get_connection("dev") as conn:
df = pd.read_sql("SELECT * FROM my_table LIMIT 10", conn)
print(df.head())
Using with SQLAlchemy¶
from dbcreds import get_engine
from sqlalchemy.orm import sessionmaker
# Get an engine
engine = get_engine("dev")
# Create a session
Session = sessionmaker(bind=engine)
session = Session()
# Use the session
results = session.execute("SELECT 1")
print(results.scalar())
Check Password Expiry¶
This shows you which passwords are expired or expiring soon.
Next Steps¶
- Learn about different backends
- Set up the web interface
- Configure password rotation