Skip to content

BayCEER/python-campbell-logger

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Python Campbell Logger Client

A library to communicate with Campbell Scientific CR loggers over http. The library was developed on base of the Campbell Scientific Web Interface documentation and has been tested with CR3000 loggers. Other logger types may work. A logger classes is provided to communicate with the logger.

# Sample script to access campbell logger

from campbell.logger import Logger
from datetime import timedelta

l = Logger("http://cr3000")
d
# Get all table uris
tabs = l.getTableUris()

# Get the 10 most recent records of the first table as a dictionary
data = l.dataMostRecent(tabs[0],10)

# Get all records of the first table since a specific time
clock = l.getClock()
data = l.dataSinceTime(tabs[0], clock - timedelta(seconds=120))

# Get all records of the first table with record nr >= 10
data = l.dataSinceRecord(tabs[0],10)

# Get all records stored since the last 2 minutes
data = l.dataBackfill(tabs[0],120)

Installation

Installing on Linux

  • Install basic tools for installation
    apt-get update
    apt-get install wget gnupg
  • Import the repository key
    wget -O - http://www.bayceer.uni-bayreuth.de/repos/apt/conf/bayceer_repo.gpg.key |apt-key add -
  • Add the BayCEER Debian repository
    echo "deb http://www.bayceer.uni-bayreuth.de/repos/apt/debian $(lsb_release -c -s) main" | tee /etc/apt/sources.list.d/bayceer.list
  • Update your repository cache
    apt-get update
  • Install the package
    apt-get install python3-campbell-logger

Installation on Windows

Install the package by a git clone request followed by a run of setup.py:

git clone https://github.com/BayCEER/python-campbell-logger.git
cd python-campbell-logger
python setup.py install

Authors

Version History

Version 1.2, Sept 19, 2022

  • Timeout parameter added for all requests

Version 1.1, June 6, 2022

  • New Debian package
  • Dropped FrameLogger to reduce dependecies

Version 1.0, Sep 9, 2020

  • Initial release

License

GNU LESSER GENERAL PUBLIC LICENSE

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages