Skip to main content

A python wrapper for the Lovense API

Project description

lovense-api-wrapper

Overview

This is a simple Python wrapper for the Lovense Standard API, developed 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, most of the code is from catboy1357, with a few enhancements made by myself.

Features

From lovense.api

  • 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 pylovense

Usage

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

from pylovense.api import GameModeWrapper

love = GameModeWrapper("My Test App", "10.0.0.69", log=True) # will log output to terminal, alternatively wrap the functions inside print statements
love.get_toys()
love.preset_request(love.presets.PULSE, time=5)

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

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.

MIT License

Copyright (c) 2025 jinxed-catgirl

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

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

pylovense-0.4.tar.gz (8.2 kB view details)

Uploaded Source

Built Distribution

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

pylovense-0.4-py3-none-any.whl (13.9 kB view details)

Uploaded Python 3

File details

Details for the file pylovense-0.4.tar.gz.

File metadata

  • Download URL: pylovense-0.4.tar.gz
  • Upload date:
  • Size: 8.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.1

File hashes

Hashes for pylovense-0.4.tar.gz
Algorithm Hash digest
SHA256 136c1f142e9a103d0c8c9cfbcbbf43670f6bae9b75860cae75899807a8b6973e
MD5 ceba52d67ce21ebd67e5239c01cf19da
BLAKE2b-256 2af16f508e4a06503c61130ef804209058b21dbbfd9f712ee26fb39b2204b8c1

See more details on using hashes here.

File details

Details for the file pylovense-0.4-py3-none-any.whl.

File metadata

  • Download URL: pylovense-0.4-py3-none-any.whl
  • Upload date:
  • Size: 13.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.1

File hashes

Hashes for pylovense-0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 fb2c449e9bdc974aecc821ee6fa6e5b0eb0a5231c0b89de4661ef3519e8a1b09
MD5 a778e743a0202e7044e1499dcbeb07c2
BLAKE2b-256 5b7ec6a72b325c8097e6d495a7f773896d239195e7941900dcedb87503bde90e

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