Skip to main content

A python implementation of the Lovense API

Project description

PyLove

Overview

This is a simple Python wrapper library for the Lovense Standard Lan API, developed over a weekend to use in my personal projects. It implements one of the several available API methods and provides basic functionality. The library is fully functional and documented, but it is provided "as-is" and might not receive frequent updates from me.

Features

From pylove.lan

  • get_toys(): Gets the toy(s) connect to the Lovense app
  • get_toys_name(): Same as get_toys() but just the name of the devices
  • preset_request(): Send one of the pre-made or user created patterns
  • function_request(): Send a single Pattern immediately
  • pattern_request(): Avoids network pressure of multiple function commands
  • stop(): Sends a stop immediately command
  • decode_response(): Make the return value of any command more readable.
  • pattern_request_raw(): More api accurate version for patterns (advanced)
  • send_command(): Send a JSON command directly to the app (advanced)

Installation

You can install the library using pip:

pip install pylove

Usage

Here's a basic example of how to use the library:

from pylove.lan import GameModeWrapper

love = GameModeWrapper("My Cool App", "10.0.0.69")
print(love.get_toys())  # methods return the response from the server.
love.preset_request(love.presets.PULSE, time=5)

Check out this example file for more info.

Note: Setup the Lovense Remote App as follows:

  1. Lovense Remote App -> Discover -> Game Mode -> Enable LAN,
  2. Take node of the Local IP, and Port. It should match the GameModeWrapper constructor

Contributing

Contributions are welcome! While I'm not actively working on this project beyond my initial needs, I will address any bugs and review pull requests as they come up. If you encounter any issues or have suggestions for improvements, feel free to open an issue or submit a pull request. If there's enough interest and demand, I'll consider dedicating more time to this project and building out more api methods.

Todo

If you are keen to add more to this library, here are the implemented API methods:

  • Standard API / By local application
  • Standard API / By server qr code
  • Standard Socket API / By local
  • Standard Socket API / By server
  • Events API

These are all the API endpoints in the Standard API solution. Other API solutions seam less useful in the context of python.

License

This project is licensed under the MIT License. See the LICENSE file for more details.

Disclaimer

This library was created for personal use and is provided "as-is" without any warranties or guarantees. Use it at your own risk.


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

pylove-1.0.3.tar.gz (11.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pylove-1.0.3-py3-none-any.whl (9.3 kB view details)

Uploaded Python 3

File details

Details for the file pylove-1.0.3.tar.gz.

File metadata

  • Download URL: pylove-1.0.3.tar.gz
  • Upload date:
  • Size: 11.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.0 CPython/3.12.2

File hashes

Hashes for pylove-1.0.3.tar.gz
Algorithm Hash digest
SHA256 c63bf3b5bf974dad7c416e7fc58d9dd64b4f60df8c6dc702be287ae55427b121
MD5 c3bdd08e1d47b707a19e41e2384933d4
BLAKE2b-256 045bc401e80ae7b6ff9b73f27da546e5aa4c671f25d825aba44c11d1eb761efb

See more details on using hashes here.

File details

Details for the file pylove-1.0.3-py3-none-any.whl.

File metadata

  • Download URL: pylove-1.0.3-py3-none-any.whl
  • Upload date:
  • Size: 9.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.0 CPython/3.12.2

File hashes

Hashes for pylove-1.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 afa802d1031e973ce50d9fc7fd0c7e5b7148cfdb818b4d0b53c1bcdd1ceba2de
MD5 1c541b37617ff3095c3d15f08db75edb
BLAKE2b-256 86c0b9dbde4c5047af4788b53de1eceafeca44d372614c594ffb94a8f2dbb9dc

See more details on using hashes here.

Supported by

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