Registry / http-networking / pycampbellcr1000

pycampbellcr1000

JSON →
library0.4pypypi✓ verified 86d ago

A Python library for communicating with Campbell Scientific CR1000 and similar dataloggers via TCP/IP or RS-232. Current version is 0.4. Development appears to be sporadic; no recent releases or updates.

pip install pycampbellcr1000
INSTALL
IMPORT
SIG · PYCAMPBELLCR1000
P
pycampbellcr1000
http-networkingpythonv0.4
Install
3.4s avg
Import
48ms
Disk
18MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v0.4 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.95 runs
installs and imports cleanly · install 0.0s · import 0.048s · 20.2MB
glibc
py 3.103.95 runs
installs and imports cleanly · install 3.4s · import 0.048s · 21MB
18MB installed
● package 18MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

CR1000
from pycampbellcr1000 import CR1000

Connects to a CR1000 datalogger, retrieves table names, and reads sample data.

from pycampbellcr1000 import CR1000 # Connect to datalogger via IP or serial logger = CR1000.from_url('tcp:192.168.1.100:6789') # or serial: logger = CR1000.from_url('serial:/dev/ttyUSB0:115200') # Get table names tables = logger.get_table_names() print('Tables:', tables) # Read data from a table (returns list of dicts) data = logger.get_data('Table1', count=5) for row in data: print(row) # Close connection logger.close()
Debug
Known issues
breakingAs of v0.4, from_url() method used for connections; older examples may use CR1000(host, port) directly which may not work.
fix
Use CR1000.from_url('tcp:host:port') instead of CR1000(host, port).
affects: 0.3 and earlier
gotchaThe library uses Python's built-in logging; enable debug logging to see communication details.
fix
import logging; logging.basicConfig(level=logging.DEBUG)
affects: all
gotchaData retrieval methods may block indefinitely if the datalogger is unreachable; set a timeout via the underlying socket timeout.
fix
Use CR1000.from_url('tcp:host:port', timeout=10) to set a timeout.
affects: all
Errors
Common errors & fixes
ModuleNotFoundError: No module named 'pycampbellcr1000'
Library not installed or installed into a different Python environment.
fix
Run 'pip install pycampbellcr1000' in the correct environment.
AttributeError: 'CR1000' object has no attribute 'get_table_names'
Using an older version of the library (pre-0.4) where method names differed.
fix
Upgrade to latest: 'pip install --upgrade pycampbellcr1000'
ConnectionRefusedError: [Errno 111] Connection refused
Datalogger is not reachable at the specified IP/port or the server is not running.
fix
Verify datalogger IP and port (default 6789 for TCP). Ensure the datalogger is connected and network accessible.
Upgrade
Version history
0.4latest on PyPI · released Nov 29, 2017
Audit
Dependencies

No dependency data recorded yet.

Agent activity
11 hits · last 30 days
node
10
Resources
pycampbellcr1000 — pip install pycampbellcr1000 · libregistry