Skip to main content

CASafari 🚀

A robust, modern web dashboard and interactive telescope automation ecosystem combining Flask, TwitchIO, and N.I.N.A. (Nighttime Imaging 'N' Astronomy).

CASafari features a custom, lightweight, native Python caserver and caclient backend pipeline imported seamlessly as redis to mimic standard Redis libraries—making the entire application 100% cross-platform without requiring external redis-server installations.


🛡️ License & Copyleft Protection

This project is proudly licensed under the GNU Affero General Public License v3.0 (AGPLv3).

What this means for users and developers:

  • Open & Collaborative: You are free to fork, clone, modify, and contribute back to this repository.
  • No Closed-Source Exploitation: If you modify this project and host it on a network or cloud server as a web application, API, or service, you are legally required to make your entire modified source code available to your users under the exact same AGPLv3 license.

📦 Installation & Setup

Developer Installation (Via Git)

Clone the repository and install it locally in editable mode:

git clone https://github.com/c-astronomy/CASafari
cd CASafari
pip install -e .

⚙️ Configuration Files

Before running the application, ensure your configuration files are properly populated in the root folder:

1. credentials.json

Used by the Twitch bot and web dashboard for API access:

{
  "client_id": "your_twitch_client_id",
  "client_secret": "your_twitch_client_secret",
  "owner_id": "your_owner_id",
  "bot_id": "your_bot_id",
  "token": "your_oauth_token"
}

2. casafari-config.json

Defines your geographic coordinates, mount tracking boundaries, and N.I.N.A. integration endpoint:

{
  "lat": 59.6,
  "lon": 16.4903,
  "AltLim": 30,
  "AltLimMax": 75,
  "AzLim": 230,
  "AzLimMax": 350,
  "expo": 30,
  "ip": "localhost:1888"
}

3. targetlist.json

Contains your celestial targets list, coordinates, and chat trigger commands (e.g., !slew_andromeda).


🛠️ Project Architecture

CASafari/
├── .github/
├── src/
│   └── CASafari/
│       ├── __init__.py             # Python package initializer
│       ├── caclient.py             # Synchronous custom Redis client wrapper
│       ├── caclientasync.py        # Asynchronous custom Redis client wrapper
│       ├── casafari-config.json    # Observer location, coordinates, and limits
│       ├── casafari.py             # Main automation hub & auto-safari loop
│       ├── caserver.py             # Native cross-platform Redis-compatible server
│       ├── nina.py                 # N.I.N.A. API bridge and equipment monitor
│       ├── targetlist.json         # Celestial target database & chat triggers
│       ├── tts.py                  # Experimental Pocket-TTS audio worker
│       ├── twitch.py               # TwitchIO chat bot and command router
│       └── webserver.py            # Flask master control dashboard UI
├── LICENSE                         # GNU AGPLv3 License text
├── README.md                       # Documentation and usage guide
├── pyproject.toml                  # Package metadata & dependencies
└── requirements.txt                # Legacy/additional requirements backup

🚀 Execution & Startup Order

⚠️ Important: The startup order is critical for proper inter-process communication.

  1. Step 1 (Mandatory First): Start caserver.py
    python caserver.py
    
  2. Step 2 (Recommended Second): Start webserver.py
    python webserver.py
    
  3. Steps 3–5 (Remaining Order is Flexible):
    • Start the N.I.N.A. Automation Bridge:
      python nina.py
      
    • Start the Core Automation Hub (Casafari):
      python casafari.py
      
    • Start the Twitch Chat Bot:
      python twitch.py
      

🤝 Contributing

We welcome community collaborations! Feel free to open a Pull Request or fork the project. All contributions remain protected under the AGPLv3 license.

Metadata

Release files for CASafari 0.1.12

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for CASafari 0.1.12
File Size Uploaded Provenance Actions
casafari-0.1.12.tar.gz 40.7 kB With provenance Details for casafari-0.1.12.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for CASafari 0.1.12
File Interpreter ABI Platform Actions
casafari-0.1.12-py3-none-any.whl Python 3 none any Details for casafari-0.1.12-py3-none-any.whl

Total release size: 84.8 kB

Release files / casafari-0.1.12.tar.gz

Download URL casafari-0.1.12.tar.gz
Size 40.7 kB
Tags Source
SHA-256 checksum
How to use checksums
a1fce93d9b7262020dc4a6545ea7f6796ad51d9835cde8193781464c5794df38
BLAKE2b-256 checksum
How to use checksums
3a40169749389f7b11def2dec283921047b200cc89036b6f51127995d0b923ac
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 26, 2026.

Transparency log

Release files / casafari-0.1.12-py3-none-any.whl

Download URL casafari-0.1.12-py3-none-any.whl
Size 44.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e1c1c68b1be835a555524e5a22b81575b2d695bc28a2971a1d7d653b36f1b9ab
BLAKE2b-256 checksum
How to use checksums
21e4858752bd8aedbb992054c108fecb8f9f3cbbe08aab5c83f3bab181a698d0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 26, 2026.

Transparency log

Security for CASafari 0.1.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for casafari-0.1.12.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 26, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page