Skip to main content

A simple CPDLC client

Project description

python-cpdlc

A simple CPDLC client for flight simulation written by python

Quick Start

  1. install package with pip or any tools you like
pip install python-cpdlc
  1. 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
    await cpdlc.start_poller()
    
    # 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


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.0.1.tar.gz (19.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

python_cpdlc-1.0.1-py3-none-any.whl (20.5 kB view details)

Uploaded Python 3

File details

Details for the file python_cpdlc-1.0.1.tar.gz.

File metadata

  • Download URL: python_cpdlc-1.0.1.tar.gz
  • Upload date:
  • Size: 19.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: pdm/2.25.2 CPython/3.10.7 Windows/10

File hashes

Hashes for python_cpdlc-1.0.1.tar.gz
Algorithm Hash digest
SHA256 88c69d0674569831708925bad72f4b057e2d065f8e21bce31bd1bd69ac95ec10
MD5 2280b6c4e0780814e11f2b2fbc1bdd88
BLAKE2b-256 f3c5f698128c2e62ab9c48731c76f4d63614494bf740ce9a8687edd55f6f24cb

See more details on using hashes here.

File details

Details for the file python_cpdlc-1.0.1-py3-none-any.whl.

File metadata

  • Download URL: python_cpdlc-1.0.1-py3-none-any.whl
  • Upload date:
  • Size: 20.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: pdm/2.25.2 CPython/3.10.7 Windows/10

File hashes

Hashes for python_cpdlc-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 9da05076c2e1ba6709553f4947ebd84c040dd5beb6561dd174972e24a131aadd
MD5 2556f370f1e141d1c3a69b02d3c734a9
BLAKE2b-256 d933201cadf5dc122a31af53fd978694cd795ad7d765f4672c451ceaa617acda

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page