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 
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.2.tar.gz (6.9 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.2-py3-none-any.whl (7.3 kB view details)

Uploaded Python 3

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

Uploaded Egg

File details

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

File metadata

  • Download URL: speedlib-2.3.2.tar.gz
  • Upload date:
  • Size: 6.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.0.0 pkginfo/1.7.0 requests/2.23.0 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.8.6

File hashes

Hashes for speedlib-2.3.2.tar.gz
Algorithm Hash digest
SHA256 9d89e7dc5ea5ad1495f4594f2edebbfc14294bebd7461e44206c6a13e424165b
MD5 65964e1905dc7f95a0f9d7a2f61cd7c4
BLAKE2b-256 83762471d397a651e777e24fe77dc94fbfe8ce57378e50fd51f84e90122a9874

See more details on using hashes here.

File details

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

File metadata

  • Download URL: speedlib-2.3.2-py3-none-any.whl
  • Upload date:
  • Size: 7.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.0.0 pkginfo/1.7.0 requests/2.23.0 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.8.6

File hashes

Hashes for speedlib-2.3.2-py3-none-any.whl
Algorithm Hash digest
SHA256 ee54c5689a6cb6ccf7102be7b3c07bf36b6ce157e65bd0ef22ed3b50d541a7ec
MD5 d68fcbf76b2f915b7bc36488388cdc3f
BLAKE2b-256 7c060af0b81b137ac65fd203ed76337ff9cc10b6d1f0dde5a9a35685a336bbea

See more details on using hashes here.

File details

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

File metadata

  • Download URL: speedlib-2.3.2-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.2-py2.7.egg
Algorithm Hash digest
SHA256 154c1ab501e5e273d92641bf58767e40ceee46d77d41ee4669fc5782fc22eeca
MD5 c0782a51bc98af03ae2c7ed4b54ae3a2
BLAKE2b-256 5df39538e180cceffbac5a4c19bf15aec20174e0a793c9ae08f1aaacb9ded9c4

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