Metadata-Version: 2.4
Name: askamerica
Version: 0.18.1
Summary: Query US government data with a single line of Python
Project-URL: Homepage, https://askamerica.ai
Project-URL: Documentation, https://askamerica.ai/docs
Project-URL: Issues, https://github.com/askamerica/askamerica-python/issues
Author-email: AskAmerica <support@askamerica.ai>
License: MIT
Keywords: census,data,fec,government,open-data,sec,sql
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Science/Research
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Scientific/Engineering :: Information Analysis
Requires-Python: >=3.8
Requires-Dist: requests>=2.28.0
Provides-Extra: all
Requires-Dist: jdk4py>=21.0.7.1; (python_version >= '3.10') and extra == 'all'
Requires-Dist: jpype1>=1.4.0; extra == 'all'
Requires-Dist: mcp>=1.0.0; extra == 'all'
Requires-Dist: pandas>=1.3.0; extra == 'all'
Provides-Extra: engine
Requires-Dist: jdk4py>=21.0.7.1; (python_version >= '3.10') and extra == 'engine'
Requires-Dist: jpype1>=1.4.0; extra == 'engine'
Requires-Dist: pandas>=1.3.0; extra == 'engine'
Provides-Extra: mcp
Requires-Dist: jdk4py>=21.0.7.1; (python_version >= '3.10') and extra == 'mcp'
Requires-Dist: jpype1>=1.4.0; extra == 'mcp'
Requires-Dist: mcp>=1.0.0; extra == 'mcp'
Description-Content-Type: text/markdown

# AskAmerica

Query 17 US government datasets — SEC filings, FEC campaign finance, Census, weather, energy, crime, and more — with a single line of Python.

## Install

```bash
pip install 'askamerica[engine]'
askamerica login            # get your free API key
```

The query engine JAR (~80 MB) is downloaded automatically on first use. To pre-download it explicitly (useful for CI or Docker):

```bash
askamerica install-engine   # optional — runs automatically on first query otherwise
```

Set your API key as an environment variable (or let `askamerica login` store it):

```bash
export ASKAMERICA_API_KEY=aa_free_...
```

## Query

**One-liner — returns a pandas DataFrame:**

```python
import askamerica as aa

df = aa.query("SELECT company_name, value_dollars FROM sec.financial_facts WHERE canonical_name = 'Revenue' ORDER BY value_dollars DESC FETCH FIRST 10 ROWS ONLY")
print(df)
```

**Raw JDBC connection:**

```python
import askamerica as aa

conn = aa.connect()
stmt = conn.createStatement()
rs = stmt.executeQuery("SELECT cik, company_name FROM sec.filing_metadata ORDER BY filing_date DESC FETCH FIRST 5 ROWS ONLY")
while rs.next():
    print(rs.getString("company_name"))
conn.close()
```

## Claude Desktop (MCP)

```bash
pip install 'askamerica[mcp]'
askamerica install-engine
askamerica mcp-config       # writes Claude Desktop config snippet
```

Sign up for a free API key at [askamerica.ai](https://askamerica.ai).
