Metadata-Version: 2.4
Name: geobit
Version: 0.1.0
Summary: Python SDK for the GeoBit AI geospatial intelligence API
Author-email: Benjamin Schleider <admin@geobit.ai>
License: MIT
Project-URL: Homepage, https://geobit.ai
Project-URL: Documentation, https://api.geobit.ai/api/v1/docs
Project-URL: Repository, https://github.com/GeoBitAI-Official/geobit-python
Keywords: geospatial,intelligence,osint,conflict,api,geobit
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 :: GIS
Classifier: Topic :: Security
Requires-Python: >=3.8
Description-Content-Type: text/markdown
Requires-Dist: requests>=2.28.0

# GeoBit AI — Python SDK

Python client for the [GeoBit AI](https://geobit.ai) geospatial intelligence API.

## Install

```bash
pip install geobit
```

## Quick Start

```python
from geobit import GeobitClient

client = GeobitClient(api_key="geobit_v1_...")

# Health check
client.health()

# Search conflicts in a country
results = client.intelligence.conflicts_search(country="Ukraine", time_range="30d")

# GDELT event search
events = client.intelligence.gdelt_events(countries=["SY", "IQ"], days=7)

# Web search with automatic geocoding
hits = client.search.web(query="military buildup near Kherson")

# Early warning alerts
alerts = client.ews.alerts(country="Sudan")

# Conflict prediction
prediction = client.ews.prediction(country="Myanmar")

# Internet connectivity monitoring
status = client.ews.connectivity(country="Ethiopia")

# Multi-source intelligence fusion
intel = client.fusion.intelligence(days_back=7)

# Real-time aircraft tracking
planes = client.flight.aircraft(bbox=[33.0, 38.0, 35.0, 45.0])

# Weather grid
weather = client.weather.grid(lat=6.5, lng=3.4, radius_km=50)
```

## Namespaces

| Namespace | Description |
|-----------|-------------|
| `client.intelligence` | Conflict search, GDELT events, battle maps |
| `client.search` | Web search, X/Twitter search with geocoding |
| `client.intel` | 20+ specialized intelligence domains |
| `client.fusion` | Multi-source fusion, proxy groups, force projection |
| `client.analysis` | Threat surface, anomaly detection, MCDA |
| `client.ews` | Early warning alerts, conflict prediction, connectivity |
| `client.flight` | Real-time aircraft tracking (OpenSky) |
| `client.weather` | Weather grids, air quality |
| `client.geospatial` | Map layers, fly-to commands |
| `client.data` | SQL queries, table access |
| `client.strategy` | Wargaming, PMESII-PT, COA |
| `client.ai` | AI script execution, chat |
| `client.billing` | Usage stats, credit balance |

## Authentication

All requests require an API key passed via the `X-API-Key` header (handled automatically).

```python
client = GeobitClient(api_key="geobit_v1_...")
```

## Error Handling

```python
from geobit import GeobitClient, AuthenticationError, InsufficientCreditsError

client = GeobitClient(api_key="geobit_v1_...")

try:
    results = client.intelligence.conflicts_search(country="Nigeria")
except AuthenticationError:
    print("Invalid API key")
except InsufficientCreditsError as e:
    print(f"Need more credits: {e.details}")
```

## API Docs

Full API documentation with Swagger UI: https://api.geobit.ai/api/v1/docs
