Skip to main content

A python library to operate 'Speed' devices

Project description

SpeedLib

A python library to operate Speed devices.

Currently the API has an unique backend allowing to control miniature devices like the Faller (c) Crane or DCC trains.

Examples

Controlling a Faller (c) crane model

from speedlib.cranes import faller
from speedlib.cranes.faller import Crane
ip_1 = "172.17.217.217"
ip_2 = "172.17.217.217"
crane_1 = Crane()
crane_2 = Crane()
crane_1.init(ip_1)
crane_2.init(ip_2)
crane_2.start_for(20*faller.ureg.millisecond,faller.MotorChassis,faller.MotorDirectionForward)
crane_1.change_speed(faller.MotorCrab, -40)

Controlling a DCC train model

from speedlib.trains import dcc
from speedlib.trains.dcc import Train
dcc.start()
train1.speed = 14
train1.faster()
train1.slower()
train1.fl = True 
print(train1)
dcc.stop()

You can find more examples in the examples directory.

Install

git clone https://github.com/CRIStAL-PADR/Speed.git

The library is in speedlib/init.py

Tests

To starts the unit tests you can do:

cd tests/
PYTHONPATH=../ python3 -m unittest

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

speedlib-2.3.1.tar.gz (5.0 kB view details)

Uploaded Source

Built Distributions

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

speedlib-2.3.1-py3-none-any.whl (7.0 kB view details)

Uploaded Python 3

speedlib-2.3.1-py2.7.egg (12.3 kB view details)

Uploaded Egg

File details

Details for the file speedlib-2.3.1.tar.gz.

File metadata

  • Download URL: speedlib-2.3.1.tar.gz
  • Upload date:
  • Size: 5.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.21.0 setuptools/50.3.0 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.7.3

File hashes

Hashes for speedlib-2.3.1.tar.gz
Algorithm Hash digest
SHA256 ceac7bde995cf032ffa45fe242583bf5ff9465c2fb8c99fbf4760ab26a3e0b08
MD5 9b94d3bf2c2d6b623fe18ca9f4ff4218
BLAKE2b-256 9523fa15737c2951f6f4251de30446f417e5710e15dece0745f3950012bed6ae

See more details on using hashes here.

File details

Details for the file speedlib-2.3.1-py3-none-any.whl.

File metadata

  • Download URL: speedlib-2.3.1-py3-none-any.whl
  • Upload date:
  • Size: 7.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.21.0 setuptools/50.3.0 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.7.3

File hashes

Hashes for speedlib-2.3.1-py3-none-any.whl
Algorithm Hash digest
SHA256 8ff4ff737e49879d816978896bbb8154b01d32f330d0b900a83a7fa9581b50f4
MD5 69f49d408270a06079fca1fff850560b
BLAKE2b-256 f6e44a61577fcb5c59eb5083bb4839f8ffa8f2244b75f34dc2d3b02a401ac83a

See more details on using hashes here.

File details

Details for the file speedlib-2.3.1-py2.7.egg.

File metadata

  • Download URL: speedlib-2.3.1-py2.7.egg
  • Upload date:
  • Size: 12.3 kB
  • Tags: Egg
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.21.0 setuptools/50.3.0 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.7.3

File hashes

Hashes for speedlib-2.3.1-py2.7.egg
Algorithm Hash digest
SHA256 3f5dc535876d025374bbe368149eb5d0297a18cf1a20fd8589dc002ba1dbd122
MD5 93a92ef52cf531f068582adf51954a04
BLAKE2b-256 3fd57c41afcf8ea93d096e427efd834fef77424d05b92a88b5c9a4b428066c74

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