A simple CPDLC client
Project description
python-cpdlc
A simple CPDLC client for flight simulation written by python
Quick Start
- install package with pip or any tools you like
pip install python-cpdlc
- use example code under
By the way, dont forgot to logon your ATC CPDLC first :)
import asyncio
from python_cpdlc import CPDLC, Network
async def main():
# Create CPDLC client with your email and hoppie code
# Please dont use mine :(
cpdlc = CPDLC("halfnothingno@gmail.com", "9BWovZBXLUy21m")
# of course, you can use your own hoppie server
# cpdlc = CPDLC("halfnothingno@gmail.com", "9BWovZBXLUy21m", "http://www.hoppie.nl/acars/system")
# Set your callsign first, and you can change this anytime you like
# But if you change this callsign, you may miss some message send to you
cpdlc.set_callsign("CES2352")
# You can change your network if necessary
# You can got your current network by cpdlc.network
cpdlc.change_network(Network.VATSIM)
# Start poll thread for message reveiver
# If you dont call this function you cant receive message
cpdlc.start_poller()
# You can also use Thread to start and I recommend this method
# If you use this lib on a GUI program
# Thread(target=cpdlc.start_poller, daemon=True).start()
# send login request
cpdlc.cpdlc_login("ZSHA")
# you can also send some other thing like DCL or just some message to someone
# wait 60 seconds
await asyncio.sleep(60)
# request logout
cpdlc.cpdlc_logout()
if __name__ == "__main__":
asyncio.run(main())
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
python_cpdlc-1.2.1.tar.gz
(20.2 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file python_cpdlc-1.2.1.tar.gz.
File metadata
- Download URL: python_cpdlc-1.2.1.tar.gz
- Upload date:
- Size: 20.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: pdm/2.25.2 CPython/3.10.7 Windows/10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9c4c003d9e1e63ce07251fd3929d4bdf76157afe97afa0fe56afb614d73d22bd
|
|
| MD5 |
0a87e7b23e27817e05bf450dff65adfa
|
|
| BLAKE2b-256 |
b2f60eba36fad05c9904e69765cf459d07662524b899f1174339ffd15d4675bf
|
File details
Details for the file python_cpdlc-1.2.1-py3-none-any.whl.
File metadata
- Download URL: python_cpdlc-1.2.1-py3-none-any.whl
- Upload date:
- Size: 21.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: pdm/2.25.2 CPython/3.10.7 Windows/10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
169962e419217e802f2683848f4f077532bf0054de43b351fec2dd93a13393df
|
|
| MD5 |
8938a67d379e16a56b21c0d544d74817
|
|
| BLAKE2b-256 |
2bc1136fe74aaa9962dca9360713cc8cf838d64d2a6fca6b8bbb204bbab2d9f1
|