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.1.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.1.1-py3-none-any.whl (20.6 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: python_cpdlc-1.1.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.1.1.tar.gz
Algorithm Hash digest
SHA256 a2650d3837e48660a68c5208186a07b63357482b7d51095f18fc32bdc52b6b28
MD5 baa53db98d15f954a49ca1bc9c29bb19
BLAKE2b-256 d46f3d3d8a4110e04912b6e907ad3c0121d53b06830eff7c8c9d632124849a87

See more details on using hashes here.

File details

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

File metadata

  • Download URL: python_cpdlc-1.1.1-py3-none-any.whl
  • Upload date:
  • Size: 20.6 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.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 05aefcc5dc6874adad01e0a9cd51cb0b4213977ac78027a27d7f064708d1056d
MD5 e846d3a4da653a6df47e9646b068602d
BLAKE2b-256 db17cd4152dbba7348755b1f7bf2ac774fa8a389ade6c1711ddcfc435c587247

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