
Research
/Security News
Toptalβs GitHub Organization Hijacked: 10 Malicious Packages Published
Threat actors hijacked Toptalβs GitHub org, publishing npm packages with malicious payloads that steal tokens and attempt to wipe victim systems.
π A beautiful CLI tool for ingesting CSV files into PostgreSQL and serving data via GraphQL
____ _ ____ _ ____ ______ __ ___ _
/ ___|_ __ __ _ _ __ | |__ / __ \| | / ___/ ___\ \ / / |_ _|_ __ __ _ __| |_
| | _| '__/ _` | '_ \| '_ \| | | | | | | \___ \\ \ / / | || '_ \ / _` |/ _` (_)
| |_| | | | (_| | |_) | | | | |__| | |___ | |___ ___) |\ V / | || | | | (_| | (_| |_
\____|_| \__,_| .__/|_| |_|\___\_\_____| \____|____/ \_/ |___|_| |_|\__, |\__,_(_)
|_| |___/
Transform your CSV data into powerful GraphQL APIs in minutes!
π Documentation β’ π Quick Start β’ π» Examples β’ π€ Contributing
π₯ Professional Data Pipeline in Your Terminal
# π Install from PyPI (Recommended)
pip install csv-graphql-cli
# π§ Or install in a virtual environment
python3 -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
pip install csv-graphql-cli
# π οΈ Development installation from source
git clone https://github.com/cjanowski/graphql-ingest.git
cd graphql-ingest
pip install -e ".[dev]"
After running pip install csv-graphql-cli
:
# 1οΈβ£ Show the main interface and available commands
csvgql
# 2οΈβ£ Initialize database connection
csvgql init-db
# 3οΈβ£ Ingest your CSV data
csvgql ingest -f data/sample_data.csv -t employees
# 4οΈβ£ Preview your data
csvgql preview -t employees
# 5οΈβ£ Start GraphQL server
csvgql serve
# 6οΈβ£ Query at http://localhost:8000/graphql
Use the convenient wrapper script (csvgql.py
) if you prefer not to install:
# Navigate to project directory
cd graphql-ingest
# 1οΈβ£ Show the main interface and available commands
python csvgql.py
# 2οΈβ£ Initialize database connection
python csvgql.py init-db
# 3οΈβ£ Ingest your CSV data
python csvgql.py ingest -f data/sample_data.csv -t employees
# 4οΈβ£ Preview your data
python csvgql.py preview -t employees
# 5οΈβ£ Start GraphQL server
python csvgql.py serve
# 6οΈβ£ Query at http://localhost:8000/graphql
For development, you can also run directly from source:
# Navigate to project directory
cd graphql-ingest
# Run CLI directly from source
python -m src.cli
# Or individual commands
python -m src.cli init-db
python -m src.cli ingest -f data/sample_data.csv -t employees
python -m src.cli serve
Demo video coming soon - showing the CLI interface in action!
# Using installed package (after pip install csv-graphql-cli)
csvgql # Show main interface
csvgql init-db # Initialize database
csvgql ingest -f data.csv -t users # Ingest CSV data
csvgql preview -t users # Preview the data
csvgql serve # Start GraphQL server
# OR using wrapper script (development)
python csvgql.py # Show main interface
python csvgql.py init-db # Initialize database
python csvgql.py ingest -f data.csv -t users # Ingest CSV data
python csvgql.py preview -t users # Preview the data
python csvgql.py serve # Start GraphQL server
After running pip install csv-graphql-cli
:
csvgql # Show main interface
csvgql init-db # Initialize database
csvgql ingest -f data.csv -t table # Ingest CSV
csvgql serve # Start GraphQL server
csvgql preview -t table # Preview table data
csvgql tables # List tables
csvgql config-info # Show configuration
If you prefer not to install the package:
# Navigate to project directory
cd graphql-ingest
# Use the wrapper script
python csvgql.py # Show main interface
python csvgql.py init-db # Initialize database
python csvgql.py ingest -f data.csv -t table # Ingest CSV
python csvgql.py serve # Start GraphQL server
python csvgql.py preview -t table # Preview table data
python csvgql.py tables # List tables
python csvgql.py config-info # Show configuration
Command | Description |
---|---|
python -m src.cli | Main CLI interface |
python -m src.cli init-db | Initialize database |
python -m src.cli ingest | Ingest CSV files |
python -m src.cli serve | Start GraphQL server |
python -m src.cli preview | Preview table data |
python -m src.cli tables | List available tables |
python -m src.cli config-info | Show current configuration |
Method | Command | Description |
---|---|---|
PyPI Package | csvgql | Main CLI interface (shows all commands) |
PyPI Package | csvgql init-db | Initialize database |
PyPI Package | csvgql ingest | Ingest CSV files |
PyPI Package | csvgql serve | Start GraphQL server |
PyPI Package | csvgql preview | Preview table data |
PyPI Package | csvgql tables | List available tables |
PyPI Package | csvgql config-info | Show current configuration |
Development | python csvgql.py | Main CLI interface |
Development | python csvgql.py init-db | Initialize database |
Development | python -m src.cli | Main CLI interface |
Development | python -m src.cli init-db | Initialize database |
{
tables {
name
columns {
name
type
}
}
}
{
tableData(tableName: "employees", limit: 10) {
data
total
}
}
mutation {
ingestCsv(file: "new_data.csv", tableName: "products") {
success
message
rowsInserted
}
}
Create .env
file in the project root:
# Database Configuration
DB_HOST=localhost
DB_PORT=5432
DB_NAME=your_database
DB_USER=your_username
DB_PASSWORD=your_password
# Server Configuration
SERVER_HOST=0.0.0.0
SERVER_PORT=8000
DEBUG=false
You can also copy the example configuration:
cp config/env.example .env
graphql-ingest/
βββ π¦ src/ # Main application code
β βββ cli.py # Command-line interface
β βββ config.py # Configuration management
β βββ database.py # Database operations
β βββ graphql_schema.py # GraphQL schema definition
β βββ server.py # FastAPI server
βββ π§ͺ tests/ # Test suite
β βββ test_basic.py # Basic functionality tests
β βββ integration_test_examples.py
βββ π examples/ # Usage examples
βββ π docs/ # Documentation
βββ π³ docker/ # Docker configuration
βββ π data/ # Sample data files
β βββ sample_data.csv # Test data
β βββ test_data_large.csv # Larger test dataset
βββ βοΈ config/ # Configuration files
β βββ env.example # Environment template
β βββ setup.cfg # Setup configuration
β βββ MANIFEST.in # Package manifest
βββ π οΈ tools/ # Build and development tools
β βββ setup.py # Package setup script
β βββ coverage.xml # Coverage reports
βββ π .github/ # GitHub workflows
βββ π requirements/ # Dependency management
βββ π CONTRIBUTE.md # Contribution guidelines
βββ π CHANGELOG.md # Change log
βββ π QUICKSTART.md # Quick start guide
βββ π README.md # Project overview
# Create virtual environment (recommended)
python3 -m venv venv
source venv/bin/activate
# Install with development dependencies
pip install -e ".[dev]"
# Run all tests
pytest
# Run with coverage
pytest --cov=src
# Run with verbose output
pytest -v
# Run specific test file
pytest tests/test_basic.py
# Build and run with Docker
docker-compose up
# Or use the Dockerfile directly
docker build -t csv-graphql-cli .
docker run -p 8000:8000 csv-graphql-cli
pip install csv-graphql-cli
python3 -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
pip install csv-graphql-cli
git clone https://github.com/cjanowski/graphql-ingest.git
cd graphql-ingest
pip install -e ".[dev]"
We welcome contributions! Please see our Contributing Guide for details.
This project is licensed under the MIT License - see the LICENSE file for details.
Made with β€οΈ and lots of πππ!
FAQs
π A beautiful CLI tool for ingesting CSV files into PostgreSQL and serving data via GraphQL
We found that csv-graphql-cli demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago.Β It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
/Security News
Threat actors hijacked Toptalβs GitHub org, publishing npm packages with malicious payloads that steal tokens and attempt to wipe victim systems.
Research
/Security News
Socket researchers investigate 4 malicious npm and PyPI packages with 56,000+ downloads that install surveillance malware.
Security News
The ongoing npm phishing campaign escalates as attackers hijack the popular 'is' package, embedding malware in multiple versions.