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+:
NWPathMonitorandgetifaddrs. - Android 7 (API 24)+:
ConnectivityManager. Adds theACCESS_NETWORK_STATEpermission (granted at install). - Desktop:
UNKNOWNwhen the machine has a route out, elseNONE. 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)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| pyxpo_network-0.1.0a1.tar.gz | 9.8 kB | With provenance | Details for pyxpo_network-0.1.0a1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| pyxpo_network-0.1.0a1-py3-none-any.whl | Python 3 | none | any | Details for pyxpo_network-0.1.0a1-py3-none-any.whl |
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 logRelease 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 logSecurity for pyxpo-network 0.1.0a1
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.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for pyxpo_network-0.1.0a1.tar.gz
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 logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.