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.2.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.2-py3-none-any.whl (20.5 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: python_cpdlc-1.0.2.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.2.tar.gz
Algorithm Hash digest
SHA256 8876b7014f04e99256b78d8e677c1ba21dd49f7883345dd9000081653548b326
MD5 ae257f17e2d6bcba200cc79b6e54defa
BLAKE2b-256 bab439f7066264ecd793dc938613bdfa51f9e4f4b5e00b2afc9152a8bc692841

See more details on using hashes here.

File details

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

File metadata

  • Download URL: python_cpdlc-1.0.2-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.2-py3-none-any.whl
Algorithm Hash digest
SHA256 06484c8cfc4769783da83395b60f5e950415f3dae512aba6ab03a45d0c0dbbcb
MD5 41df8bb01027fc14d945c54ff0cfdf8f
BLAKE2b-256 a9f1760aabffc8d176bdd37d5c5b13245dfcedf8cd3e9f32b08e9604d5999a67

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