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
    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


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.0.tar.gz (20.2 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.2.0-py3-none-any.whl (20.9 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: python_cpdlc-1.2.0.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

Hashes for python_cpdlc-1.2.0.tar.gz
Algorithm Hash digest
SHA256 8199af9b972d2a6e59d5c65c1a5d9a1fdc9a240bdb3b50a99e97443395374f3f
MD5 587314143cff2b0faa13010558ff21af
BLAKE2b-256 aa558a0161698530770303dd6fadd883dedd87a9e9056ad6b20753d7d0b5bc04

See more details on using hashes here.

File details

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

File metadata

  • Download URL: python_cpdlc-1.2.0-py3-none-any.whl
  • Upload date:
  • Size: 20.9 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.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 bfdfa969cd004371ca367b6cde3eecbce874fce02f9c130d4f0570a77db81c90
MD5 f346f72f5a7418293df89d93e1c33c25
BLAKE2b-256 0967b6f4df0bb5c80b1353e7acc73940670e5618044a020be8c6810ebd9a3be2

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