Skip to main content

PyAirmore is a communication layer between an Android Airmore server and the client.

Project description

PyAirmore

PyPI PyPI - Status PyPI - Python Version PyPI - License Codacy grade Gitter

Build Coverage
master Travis (.org) master Codecov master
development Travis (.org) development Codecov development

PyAirmore is a Airmore client library for Android Airmore server. You can get information from Airmore server on your Android.

Simple Example

At first, you need to know your device's IPv4 address, which you can easily find out by simply opening your Airmore application on Android, click options (top-right, triple vertical dots) button, press "Get IP".

Then, you start coding:

from ipaddress import IPv4Address
from pyairmore.request import AirmoreSession  # import session

device_ip = IPv4Address("your ip address")  # need to put your ip
session = AirmoreSession(device_ip)  # also you can put your port as int
# airmore's port default is 2333

# you can check if your airmore server is running
# you better do it before doing anything on your device
session.is_server_running  # True

# and before doing anything, you must request access from your device
# you better turn on your airmore app on your device and watch it
session.request_authorization()  # True if accepted, False if denied
# when you request authorization, airmore app on your device will
# provide a dialogue to accept the authorization, ensure to accept

Now that we created an authorized session, we can now create a Service. You can use services to access many functionalities of your device. For the sake of simplicity, we will use a service called DeviceService.

# assuming we have done above

from pyairmore.service.device import DeviceService

device = DeviceService(session)
# all services initializes with a session instance

# you can once more do `Session::is_server_running` and
# `Session::request_authorization` just in case

details = device.fetch_device_details()

# Now we can access many details about out device.

details.power  # 0.74
details.device_name  # "My device"
details.is_root  # True, bcoz real men use rooted device
details.imei  # muhahaha
details.call_history_count  # 666

# so on and so forth

Documentation

You can get latest documentation from here and you can also check out development branch's documentation here, which is supposed to have next release features.

Contribution

Please refer to contribution guide before contributing.

You can, then, quickly contribute by cloning the project, opening it up with your favorite IDE or text editor which supports TODOs and check todos for needs, or you can also check the issues.

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

pyairmore-0.2.1a1.tar.gz (10.7 kB view details)

Uploaded Source

File details

Details for the file pyairmore-0.2.1a1.tar.gz.

File metadata

  • Download URL: pyairmore-0.2.1a1.tar.gz
  • Upload date:
  • Size: 10.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.19.1 setuptools/40.5.0 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.6.3

File hashes

Hashes for pyairmore-0.2.1a1.tar.gz
Algorithm Hash digest
SHA256 74a4ef55475909750f2f1d8d10a2980e9533e70adcd7878e4a06b6c3a806c227
MD5 b180bf039ff8c80a3243914d7b823711
BLAKE2b-256 d3d27744d31dbbc2887104fbdafe991bc32b8c32ec684aaa0795e7821482e648

See more details on using hashes here.

Supported by

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