Skip to main content

SpaceXPy

A wrapper that supports asynchronous.

This package is Asynchronous wrapping of the informal SpaceX REST API.

Install

pip install spacexpy

Quick Example

Sync

import spacexpy

spacex = spacexpy.SpaceX()
cl = spacex.company()

print(cl.headquarters)
print(cl.headquarters.address)

Async

import asyncio
import spacexpy

async def main():
    spacex = spacexpy.SpaceX()
    cl = await spacex.company()
    print(cl.headquarters)
    print(cl.headquarters.address)

loop = asyncio.get_event_loop()
loop.run_until_complete(main())

Print:

{"address": "Rocket Road", "city": "Hawthorne", "state": "California"}
Rocket Road

Get all list

Sync

import spacexpy


spacex = spacexpy.SpaceX()
cl = spacex.capsules()

print(cl)

Async

import asyncio
import spacexpy

async def main():
    spacex = spacexpy.SpaceX()
    cl = await spacex.capsules()
    print(cl)

loop = asyncio.get_event_loop()
loop.run_until_complete(main())

Print:

[
    {
        "reuse_count": 1,
        "water_landings": 1,
        "land_landings": 0,
        "last_update": "Reentered after three weeks in orbit",
        "launches": [
            "5eb87cdeffd86e000604b330"
        ],
        "serial": "C101",
        "status": "retired",
        "id": "5e9e2c5bf35918ed873b2664"
    },
    ...
]

Attribute

Check this docs

Patch note

2.0.2

2.0.1

2.0.0

  • Now support Sync
  • Change model
  • PR #3

1.0.1

  • Grammer fix 1.0.1: PR #1

1.0.0

  • Released 1.0.0: All endpoints cover

Contributing

You can Open an issue or submit PRs.

Metadata

Release files for spacexpy 2.0.2

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

Source distribution (sdist)

Source distribution for spacexpy 2.0.2
File Size Uploaded Provenance Actions
spacexpy-2.0.2.tar.gz 5.7 kB Without provenance Details for spacexpy-2.0.2.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for spacexpy 2.0.2
File Interpreter ABI Platform Actions
spacexpy-2.0.2-py3-none-any.whl Python 3 none any Details for spacexpy-2.0.2-py3-none-any.whl

Total release size: 11.8 kB

Release files / spacexpy-2.0.2.tar.gz

Download URL spacexpy-2.0.2.tar.gz
Size 5.7 kB
Tags Source
SHA-256 checksum
How to use checksums
95dd47a8132e364f9ab27bfcb708b6f4425479e8d67c28fc22ba858e35f56d68
BLAKE2b-256 checksum
How to use checksums
c181a9dacd25bc7c132d7cc2cb9f47d92c1b997521688c11311a3c7b09e34dd5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.0 CPython/3.10.1

Release files / spacexpy-2.0.2-py3-none-any.whl

Download URL spacexpy-2.0.2-py3-none-any.whl
Size 6.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
cf5351b5b7525fdec53b5eece2371b150b382f5a26b0ac6b3403e1df99639399
BLAKE2b-256 checksum
How to use checksums
b63083dee7defd81c5e28fe91122604dff2fa991936555c48808a5fdba043939
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.0 CPython/3.10.1

Security for spacexpy 2.0.2

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.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A 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.

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