Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

pyxpo-network

Network state, IP address and connectivity changes for pyxpo apps. The API follows expo-network.

pip install pyxpo-network
[tool.pyxpo]
modules = ["network"]
import pyxpo_network as Network

state = await Network.get_network_state_async()
print(state.type, state.is_connected, state.is_internet_reachable)   # NetworkStateType.WIFI True True
print(await Network.get_ip_address_async())                          # 192.168.1.20

sub = Network.add_network_state_listener(lambda s: print("now", s.type))
sub.remove()


def OfflineBanner():
    state = Network.use_network_state()     # re-renders on every change
    if state.is_connected is False:
        return Text("You are offline")

Every name also has its expo-network spelling (Network.getNetworkStateAsync, Network.useNetworkState). NetworkState accepts Expo's camelCase keys too (state["isInternetReachable"]), and to_dict() gives the camelCase dict.

Functions

Function Returns Platforms
get_network_state_async() NetworkState all
get_ip_address_async() str, the IPv4 address; "0.0.0.0" without a network all
is_airplane_mode_enabled_async() bool Android
add_network_state_listener(fn) Subscription with .remove(). fn(state) runs on every change, and once with the current state when the first listener starts. iOS, Android
use_network_state() NetworkState, updated on change iOS, Android

NetworkState

Field Notes
type NetworkStateType: NONE, UNKNOWN, CELLULAR, WIFI, BLUETOOTH, ETHERNET, WIMAX, VPN, OTHER.
is_connected There is an active network.
is_internet_reachable Android: the system validated internet access. iOS: the path is satisfied.

Platforms

  • iOS 15+: NWPathMonitor and getifaddrs.
  • Android 7 (API 24)+: ConnectivityManager. Adds the ACCESS_NETWORK_STATE permission (granted at install).
  • Desktop: UNKNOWN when the machine has a route out, else NONE. No change events.

Metadata

Release files for pyxpo-network 0.1.0a1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pyxpo-network 0.1.0a1
File Size Uploaded
pyxpo_network-0.1.0a1.tar.gz 9.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for pyxpo-network 0.1.0a1
File Interpreter ABI Platform
pyxpo_network-0.1.0a1-py3-none-any.whl Python 3 none any Details

Total release size: 19.8 kB

Release files / pyxpo_network-0.1.0a1.tar.gz

Download URL pyxpo_network-0.1.0a1.tar.gz
Size 9.8 kB
Tags Source
SHA-256 checksum
How to use checksums
ad461da169da324a67ed492e15d6eb94d0626e40dbf3060c8755973cf0fbcd54
BLAKE2b-256 checksum
How to use checksums
aeab6ddc138ab644d964915a1494ebc14a13bb13ad1420c09d831bcc5dd7b7b4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 16, 2026.

Transparency log

Release files / pyxpo_network-0.1.0a1-py3-none-any.whl

Download URL pyxpo_network-0.1.0a1-py3-none-any.whl
Size 10.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
53422847eaabffc6560d30a15cccfc02a763615719e6e2147ae1d147691ca5b2
BLAKE2b-256 checksum
How to use checksums
4b2b7551f7ca85ef71cb4c181e4661d092eddbb193ccf511a758389563b8a5ce
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 16, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.1.0a1 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page