Metadata-Version: 2.4
Name: python-osint
Version: 0.1.0
Summary: Lightweight OSINT utilities with a built-in Telegram Bot API client; no python-telegram-bot dependency.
Author: python-osint contributors
License: MIT
Keywords: osint,telegram,bot,recon,intelligence
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Requires-Python: >=3.10
Description-Content-Type: text/markdown

# python-osint

A small, self-contained Python package for OSINT-style result formatting and Telegram reporting.

## Key point

This package **does not use `python-telegram-bot`**. It talks directly to the official Telegram Bot API using Python's standard library, so there is no PTB dependency.

## Install

```bash
pip install python-osint
```

For local development:

```bash
pip install -e .
```

## Configure Telegram

Do not put a bot token into the package source or publish it to PyPI.

Set environment variables:

```env
OSINT_BOT_TOKEN=123456:YOUR_TOKEN
OSINT_CHAT_ID=-1001234567890
# Optional:
OSINT_THREAD_ID=123
OSINT_TELEGRAM_TIMEOUT=20
```

## Send a report

```python
import asyncio
from python_osint import OSINTReport

async def main():
    report = OSINTReport(
        "Firebase Connection Submitted",
        fields={
            "Firebase URL": "https://example-default-rtdb.firebaseio.com",
            "Status": "connected",
        },
        source="python-osint",
    )
    await report.send()

asyncio.run(main())
```

## Direct Telegram API access

```python
from python_osint import TelegramBot

bot = TelegramBot()  # reads OSINT_BOT_TOKEN
await bot.send_message("-1001234567890", "hello")
```

Available built-ins currently include:

- `get_me`
- `send_message`
- `edit_message_text`
- `delete_message`
- `answer_callback_query`
- `send_document`
- `getUpdates`
- long polling through `poll`

## For the existing OTP/Firebase bot

The intended integration is:

```python
from python_osint import OSINTReport

await OSINTReport(
    "Firebase Connection Submitted",
    fields={"Firebase URL": firebase_url},
    source="otp-panel-bot",
).send()
```

This lets the existing project report newly-added Firebase panels without installing `python-telegram-bot` just for reporting.

### Important distinction

`python-osint` can report data to a Telegram bot, but a Telegram bot token does not magically create a public OSINT database. If you want data to be stored centrally, add a database/API layer separately. Never ship private Firebase credentials or bot tokens inside a public PyPI package.
