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.1.2.tar.gz
(20.5 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.1.2.tar.gz.
File metadata
- Download URL: python_cpdlc-1.1.2.tar.gz
- Upload date:
- Size: 20.5 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 |
dd97b3f6107b607f54a7a8e0fac3f02488893e4a5b24a07ee06327150e7afaf8
|
|
| MD5 |
d0629a167b7438c3602f2a5329246046
|
|
| BLAKE2b-256 |
42824ac1a3b3226f115a0b950aebd76a79424526a1e0622acf32edc414360671
|
File details
Details for the file python_cpdlc-1.1.2-py3-none-any.whl.
File metadata
- Download URL: python_cpdlc-1.1.2-py3-none-any.whl
- Upload date:
- Size: 21.8 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 |
d106dde610268c2866b03f3539c9d692b7f9fb94ff67ad746351f65a436cbec9
|
|
| MD5 |
0f71d08eb95979022bac79b26ee96206
|
|
| BLAKE2b-256 |
fac513cde5723e12adf2775f3dbe7b8cba4183ed36df64669a5c580e311c26c1
|