https://github.com/k96e/stellariumrc
Control Stellarium by Python
https://github.com/k96e/stellariumrc
python remote-control stellarium
Last synced: 3 months ago
JSON representation
Control Stellarium by Python
- Host: GitHub
- URL: https://github.com/k96e/stellariumrc
- Owner: k96e
- License: mit
- Created: 2023-08-12T10:22:45.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2023-11-05T01:48:45.000Z (over 1 year ago)
- Last Synced: 2025-02-03T16:39:28.407Z (4 months ago)
- Topics: python, remote-control, stellarium
- Language: Python
- Homepage:
- Size: 23.4 KB
- Stars: 5
- Watchers: 1
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# StellariumRC
### Control Stellarium by Python
## Installation
```bash
pip install stellariumrc
```## Requirements
* python3
* requests## Usage
Before starting, please make sure that Stellarium is running and the RemoteControl plugin is enabled.
```python
import StellariumRCs = StellariumRC.Stellarium() # you can pass the host, port and password (if any) as parameters
print(s.main.getStatus()) # get the current state of Stellarium
s.main.setFocus(target='moon',mode='zoom') # focus on moon and auto zoom-in
print(s.objects.getInfo('moon')) # get info about moon
```For more API descriptions, please refer to the source code comments and Stellarium's [RemoteControl plugin HTTP API description](https://stellarium.org/doc/0.20/remoteControlApi.html).