Skip to main content

OpenShock Python

Unofficial, lightweight helper for the OpenShock API. Designed to be easy to use for anyone, with optional advanced controls for developers.

What this project offers

  • Simple Python client to list devices/shockers and send actions (shock, vibrate, beep).
  • Optional CLI for quick checks without writing code.
  • Keeps your API key in memory only; the CLI can store it securely via your system keyring.

License TL;DR (see full LICENSE.md for complete terms)

  • Free for non-commercial, ethical use; you may study, modify, and share it.
  • You can include it in other open-source projects as a separate library component.
  • You must share source code for adaptations you distribute.
  • No commercial use, monetization, or commercial AI training without a separate license.
  • Adaptations must keep this license (unless used as a distinct component as allowed in Section 6A).

Quick start (Python)

  1. Install the library:

    pip install Nanashi-OpenShockPY
    
  2. Get your OpenShock API key from your account dashboard.

  3. Create a client with a User-Agent and your API key:

    from OpenShockPY import OpenShockClient
    
    client = OpenShockClient(
        api_key="YOUR_API_KEY",
        user_agent="YourAppName/1.0",
    )
    
  4. List devices or send an action:

    print(client.list_devices())
    client.shock("YOUR_SHOCKER_ID", intensity=50, duration=1000)
    

Optional CLI (no coding needed)

Install with CLI support:

pip install "Nanashi-OpenShockPY[cli]"

Store your API key securely, then list devices:

python -m OpenShockPY.cli login --api-key YOUR_KEY
python -m OpenShockPY.cli devices

Send a command (use a shocker ID, not a device ID):

python -m OpenShockPY.cli shock --shocker-id YOUR_SHOCKER_ID --intensity 40 --duration 1500

The CLI automatically sets an appropriate User-Agent.

Installation options

  • Library only (most people): pip install Nanashi-OpenShockPY
  • Library + CLI extras (adds keyring): pip install "Nanashi-OpenShockPY[cli]"
  • Library + CLI extras + Potential future deps: pip install "Nanashi-OpenShockPY[all]"
  • Development/editable install from this repo: pip install -e . (or pip install -e ".[cli]" for CLI)

Responsible use and licensing

  • This project is for non-commercial, ethical use only. Commercial use requires a separate license.
  • Respect local laws and the rights and safety of others when issuing control commands.
  • Full terms: LICENSE.md.

Need more detail?

Advanced options, API notes, and developer tips are available in ADVANCED.md.

Metadata

Release files for Nanashi-OpenShockPY 0.0.0.5

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

Source distribution (sdist)

Source distribution for Nanashi-OpenShockPY 0.0.0.5
File Size Uploaded Provenance Actions
nanashi_openshockpy-0.0.0.5.tar.gz 11.9 kB With provenance Details for nanashi_openshockpy-0.0.0.5.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for Nanashi-OpenShockPY 0.0.0.5
File Interpreter ABI Platform Actions
nanashi_openshockpy-0.0.0.5-py3-none-any.whl Python 3 none any Details for nanashi_openshockpy-0.0.0.5-py3-none-any.whl

Total release size: 22.8 kB

Release files / nanashi_openshockpy-0.0.0.5.tar.gz

Download URL nanashi_openshockpy-0.0.0.5.tar.gz
Size 11.9 kB
Tags Source
SHA-256 checksum
How to use checksums
ea69557b5b79ea656831f7f945965d978681b2d2bbb530240acad7afc48e34ed
BLAKE2b-256 checksum
How to use checksums
2f30fa86e8568c507a0e425f05b0355512b8e1504124e67aeaf4ede1f19a8080
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.9

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 Nov 29, 2025.

Transparency log

Release files / nanashi_openshockpy-0.0.0.5-py3-none-any.whl

Download URL nanashi_openshockpy-0.0.0.5-py3-none-any.whl
Size 10.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
a759ef9ee1500fcfda7a9fc8f9290785242fb2565ec44fe10a29ac134cf74664
BLAKE2b-256 checksum
How to use checksums
1288b454f7e586f4a8af50a2567c0baf6a2881b42d1f90655a6e46a07741741a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.9

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 Nov 29, 2025.

Transparency log

Security for Nanashi-OpenShockPY 0.0.0.5

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.

Select from 2 files

Attestation for nanashi_openshockpy-0.0.0.5.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 Nov 29, 2025.

Transparency log

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