GithubHelp home page GithubHelp logo

uetke / uuserver Goto Github PK

View Code? Open in Web Editor NEW
6.0 1.0 1.0 21 KB

Controls devices through the network

Home Page: https://www.uetke.com/projects/network-control/

Python 100.00%
flask instrumentation network-control devices lab science research laboratory

uuserver's Introduction

Instrument Server/Client

The main purpose of this project is to have a server running in a remote machine, accessible via the network, that can trigger actions on devices.

The server is built around Flask with threading for the actions on devices, allowing to concurrently trigger long measurements or processes.

More documentation is available at uuserver.readthedocs.io

How to use it

You need to import the instserver package into your own project and load the devices you want to have available.

Server side

In the server side you run just the server and the classes that correspond to the devices. If you need more personalization, you can always check the documentation at Flask, specially regardin the listening IP and port.

from instserver.server import InstServer
from instserver.dummyDevice import dummyDevice
# First instantiate the device
dev = dummyDevice()

# Now is time for the server:
server = InstServer(__name__)
server.add_device(dev,'dev')
server.run(debug=True)

Client side

from instserver.client import InstClient
# First instantiate the client with the IP address and port of the server
c = InstClient('http://127.0.0.1:5000')
# Let's print a list of the available devices and methods on the server
print(c.listdevices())

Building the documentation

The documentation of the program can be build locally and is available at http://uuserver.readthedocs.io/.

To build the documentation locally, you need to have sphinx installed. Go to the folder docs and run the following command:

    sphinx-build -b html source/ build/

This will build all the documentation from the source folder into the build folder. Remember that for it to work, the program needs to import every module, therefore you can't build the documentation if you don't have the dependencies in order.

uuserver's People

Contributors

aquilesc avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Forkers

julianmuenzberg

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.