Skip to main content

KA3005P Python Library

This Python library provides a high-level interface to control Korad, Tenma, RS, Velleman, Stamos, and other compatible power supplies via their serial interface. It is built on top of a Rust library ka3005p.

Installation

Make sure you have Python 3.8 or higher installed. You can install the library from PyPI by running the following command in your terminal:

pip install ka3005p

Note: If you are using Linux, you may need to add users to the dialout group or adjust the permissions of the serial interfaces that are needed to communicate with the power supply.

To add a user to the dialout group, you can use the following command: sudo usermod -a -G dialout username(please remember that logging out and logging back in may be required for the changes to take effect).

Usage

from ka3005p import PowerSupply

# List connected power supplies
devices = PowerSupply.list_power_supplies()

# Take control over a power supply
#
# Attention: Only one handle at the time is allowed to exist for a single PowerSupply.
#
#  Note: If no parameter is specified the first power supply which was found will be used.
power_supply = PowerSupply(devices[0])


# Prepare output voltage and current
power_supply.voltage = 12.0
power_supply = 0.5

# Turn on the output
power_supply.enable()

# Read voltage and current  
v = power_supply.voltage
a = power_supply.current

# Store current settings in memory slot 1
power_supply.save(1)

# Turn off the output
power_supply.disable()

# Load settings from memory slot 2
power_supply.load(2)

Building from Source

If you need to build the library from the source, you'll need Python development headers and Rust installed:

  1. Clone the repository:

    git clone git@github.com:nicoretti/ka3005p.git
    cd ka3005p
    
  2. Build and install using maturin (install it if it's not installed):

    pip install maturin
    maturin develop
    
  3. To build a wheel:

    maturin build --release
    

License

This project is licensed under either of

at your option.

Release files for ka3005p 0.5.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for ka3005p 0.5.0
File Size Uploaded
ka3005p-0.5.0.tar.gz 485.9 kB Details

Built distributions (wheels)

Table of built distributions (wheels) for ka3005p 0.5.0
File
ka3005p-0.5.0-cp312-none-win_amd64.whl CPython 3.12 none Windows x86-64 Details
ka3005p-0.5.0-cp312-none-win32.whl CPython 3.12 none Windows x86-32 Details
ka3005p-0.5.0-cp312-cp312-macosx_11_0_arm64.whl CPython 3.12 CPython 3.12 macOS 11.0+ ARM64 Details
ka3005p-0.5.0-cp312-cp312-macosx_10_12_x86_64.whl CPython 3.12 CPython 3.12 macOS 10.12+ x86-64 Details
ka3005p-0.5.0-cp311-none-win_amd64.whl CPython 3.11 none Windows x86-64 Details
ka3005p-0.5.0-cp311-none-win32.whl CPython 3.11 none Windows x86-32 Details
ka3005p-0.5.0-cp311-cp311-macosx_11_0_arm64.whl CPython 3.11 CPython 3.11 macOS 11.0+ ARM64 Details
ka3005p-0.5.0-cp311-cp311-macosx_10_12_x86_64.whl CPython 3.11 CPython 3.11 macOS 10.12+ x86-64 Details
ka3005p-0.5.0-cp310-none-win_amd64.whl CPython 3.10 none Windows x86-64 Details
ka3005p-0.5.0-cp310-none-win32.whl CPython 3.10 none Windows x86-32 Details
ka3005p-0.5.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl CPython 3.10 CPython 3.10 Linux glibc 2.17+ x86-64 Details
ka3005p-0.5.0-cp310-cp310-macosx_11_0_arm64.whl CPython 3.10 CPython 3.10 macOS 11.0+ ARM64 Details
ka3005p-0.5.0-cp310-cp310-macosx_10_12_x86_64.whl CPython 3.10 CPython 3.10 macOS 10.12+ x86-64 Details
ka3005p-0.5.0-cp39-none-win_amd64.whl CPython 3.9 none Windows x86-64 Details
ka3005p-0.5.0-cp39-none-win32.whl CPython 3.9 none Windows x86-32 Details
ka3005p-0.5.0-cp38-none-win_amd64.whl CPython 3.8 none Windows x86-64 Details
ka3005p-0.5.0-cp38-none-win32.whl CPython 3.8 none Windows x86-32 Details

Total release size: 9.1 MB

Release files / ka3005p-0.5.0.tar.gz

Download URL ka3005p-0.5.0.tar.gz
Size 485.9 kB
Tags Source
SHA-256 checksum
How to use checksums
e4b723928bd8497f7b1a5863623b26be061e77c6d37bb645387fbd2f626e7329
BLAKE2b-256 checksum
How to use checksums
c802092d0d38bbf0abe114a775fd972828306e297ef201c87435b8a9e182af50
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/1.5.1

Release files / ka3005p-0.5.0-cp312-none-win_amd64.whl

Download URL ka3005p-0.5.0-cp312-none-win_amd64.whl
Size 712.5 kB
Tags CPython 3.12 Windows x86-64
SHA-256 checksum
How to use checksums
58cc5843bac8af23ce5997e264e56281e7eb714bb6e82bd577a553e2b58b23e0
BLAKE2b-256 checksum
How to use checksums
93ab6b29096607bce45ef2a6b92adce907ecd97e7958685fd4203902cd281097
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/1.5.1

Release files / ka3005p-0.5.0-cp312-none-win32.whl

Download URL ka3005p-0.5.0-cp312-none-win32.whl
Size 644.7 kB
Tags CPython 3.12 Windows x86-32
SHA-256 checksum
How to use checksums
eb61a8f56014cbb911aab6a1706f0ae4dafed9dd0e857b05c90d4d0068b6239b
BLAKE2b-256 checksum
How to use checksums
92146ca046bfd2252d035769f43bea0cecc7b6d780368bc1f8487dbed3d41f8c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/1.5.1

Release files / ka3005p-0.5.0-cp312-cp312-macosx_11_0_arm64.whl

Download URL ka3005p-0.5.0-cp312-cp312-macosx_11_0_arm64.whl
Size 247.8 kB
Tags CPython 3.12 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
f6df3bd0a3378129fb8b3222cd9030a3b3e3cf572a869b6048e552bfd970e92f
BLAKE2b-256 checksum
How to use checksums
186ab098048cfbfd1105dd10c0bb4eedea1c079f76851f664a73d5372f0cb1c2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/1.5.1

Release files / ka3005p-0.5.0-cp312-cp312-macosx_10_12_x86_64.whl

Download URL ka3005p-0.5.0-cp312-cp312-macosx_10_12_x86_64.whl
Size 254.8 kB
Tags CPython 3.12 macOS 10.12+ x86-64
SHA-256 checksum
How to use checksums
826e95a2deeb8396f34d14e199a57dbdf1e5b300938c8876a0c7d4ee504ee540
BLAKE2b-256 checksum
How to use checksums
75ccffb458cc32a6df84ed240dc09534e2cd0819a4cada43e9b60d6dd0bc28b3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/1.5.1

Release files / ka3005p-0.5.0-cp311-none-win_amd64.whl

Download URL ka3005p-0.5.0-cp311-none-win_amd64.whl
Size 712.2 kB
Tags CPython 3.11 Windows x86-64
SHA-256 checksum
How to use checksums
1b6c4aa3ba6f399d890067b886f8929e256a90b0098c2201951af8730393a9e2
BLAKE2b-256 checksum
How to use checksums
e942a019a4c4ab2a94ed3f6e06b3330a7b57258df251fb4ebf99dc3d78895026
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/1.5.1

Release files / ka3005p-0.5.0-cp311-none-win32.whl

Download URL ka3005p-0.5.0-cp311-none-win32.whl
Size 644.0 kB
Tags CPython 3.11 Windows x86-32
SHA-256 checksum
How to use checksums
9762f257da5f8f16993fb5bb9c50fcba229f7df3dc592a088a64df0b1d06be4a
BLAKE2b-256 checksum
How to use checksums
dc173a11ddfbb35c31fc00917c8317e02873e30fcd6e45f8414359092ada2a8c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/1.5.1

Release files / ka3005p-0.5.0-cp311-cp311-macosx_11_0_arm64.whl

Download URL ka3005p-0.5.0-cp311-cp311-macosx_11_0_arm64.whl
Size 248.0 kB
Tags CPython 3.11 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
9ab1e137c2f3228e6a199b7eed6865a89f487e74e59b56be6400ddb68ef2fd58
BLAKE2b-256 checksum
How to use checksums
9be6e9fd457fd2e98d7b330a6c4eb6905451a862002ef355a7a22bccc20d1d98
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/1.5.1

Release files / ka3005p-0.5.0-cp311-cp311-macosx_10_12_x86_64.whl

Download URL ka3005p-0.5.0-cp311-cp311-macosx_10_12_x86_64.whl
Size 255.0 kB
Tags CPython 3.11 macOS 10.12+ x86-64
SHA-256 checksum
How to use checksums
14e81defed469e42b1ce4448fdef067035c68e33c715b530c477eac09e13d8ab
BLAKE2b-256 checksum
How to use checksums
ca2ce1819771a14a8320f867a787ebc8ec3bc7653758fe754cdacc8f9c9a79b9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/1.5.1

Release files / ka3005p-0.5.0-cp310-none-win_amd64.whl

Download URL ka3005p-0.5.0-cp310-none-win_amd64.whl
Size 712.2 kB
Tags CPython 3.10 Windows x86-64
SHA-256 checksum
How to use checksums
9803dc6a904430c84c6cc6b7b49960dd91a57149903bac5077bce772eccdeee3
BLAKE2b-256 checksum
How to use checksums
ff4f48b20f21ab86a2ed26f65f76d0e9bd41bf45140963065af17c7ffc3946a6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/1.5.1

Release files / ka3005p-0.5.0-cp310-none-win32.whl

Download URL ka3005p-0.5.0-cp310-none-win32.whl
Size 644.1 kB
Tags CPython 3.10 Windows x86-32
SHA-256 checksum
How to use checksums
b1cb4cd0c711a6f6cd97c6c3938d73cbeae93c114fda90e099392b08914bcf9c
BLAKE2b-256 checksum
How to use checksums
560eaa154717471f61102e021c5eb751ba7ce5c9fff680bf04f175d790d6313a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/1.5.1

Release files / ka3005p-0.5.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL ka3005p-0.5.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 364.8 kB
Tags CPython 3.10 Linux glibc 2.17+ x86-64
SHA-256 checksum
How to use checksums
20e4dda6369a310f1e5217f9bee9366c18cb858731c502295aedd8e64657a9ac
BLAKE2b-256 checksum
How to use checksums
378fa76b1f6a64e888f8491f9c2b00b14cc00cb745451014a37df4b8baf1f21c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/1.5.1

Release files / ka3005p-0.5.0-cp310-cp310-macosx_11_0_arm64.whl

Download URL ka3005p-0.5.0-cp310-cp310-macosx_11_0_arm64.whl
Size 248.1 kB
Tags CPython 3.10 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
4eee61565e0e56cd0a3334641894e70699869b2e3bb5146c99d90712814b4e0a
BLAKE2b-256 checksum
How to use checksums
ec41731d40b0c6e77ca7e022a1e68711eed79b126c76ce1b11ed07b86fbabdbb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/1.5.1

Release files / ka3005p-0.5.0-cp310-cp310-macosx_10_12_x86_64.whl

Download URL ka3005p-0.5.0-cp310-cp310-macosx_10_12_x86_64.whl
Size 255.1 kB
Tags CPython 3.10 macOS 10.12+ x86-64
SHA-256 checksum
How to use checksums
c16232156c39663203bd7c61006a031538169fd6fd29ef801c6881231cead313
BLAKE2b-256 checksum
How to use checksums
fc76d0f6a23ba5d56848a7a70be1125f98d887ad127f54b926895d5b1a4ce1b9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/1.5.1

Release files / ka3005p-0.5.0-cp39-none-win_amd64.whl

Download URL ka3005p-0.5.0-cp39-none-win_amd64.whl
Size 712.4 kB
Tags CPython 3.9 Windows x86-64
SHA-256 checksum
How to use checksums
9d2c40d5be8dde56019b7bf62e97122d4b706a7301a90346fff89944e9c265b1
BLAKE2b-256 checksum
How to use checksums
205b2cd2f74d693657746fcf1479c11a65411a6a9b680a789003196c239a24d4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/1.5.1

Release files / ka3005p-0.5.0-cp39-none-win32.whl

Download URL ka3005p-0.5.0-cp39-none-win32.whl
Size 644.3 kB
Tags CPython 3.9 Windows x86-32
SHA-256 checksum
How to use checksums
239403c18ab549a82b5234838cbcf7a91ae7e244e4f37b658d754d79906285c9
BLAKE2b-256 checksum
How to use checksums
118d41a7868f629ebb8c0aada951d9db1763d47a2531bebf9d07206fe0d7e03b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/1.5.1

Release files / ka3005p-0.5.0-cp38-none-win_amd64.whl

Download URL ka3005p-0.5.0-cp38-none-win_amd64.whl
Size 712.6 kB
Tags CPython 3.8 Windows x86-64
SHA-256 checksum
How to use checksums
dacb007af7a5397d5d55581731318d964dbda362fdaa6ead6651d98cd1a37f43
BLAKE2b-256 checksum
How to use checksums
aabc2e72e049cfe2097ab29e8529a32892386c1cc1923eba2957fe35e77e260d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/1.5.1

Release files / ka3005p-0.5.0-cp38-none-win32.whl

Download URL ka3005p-0.5.0-cp38-none-win32.whl
Size 644.3 kB
Tags CPython 3.8 Windows x86-32
SHA-256 checksum
How to use checksums
cb83bbf2bf3da21ee4ba5b893b1546cd40d4bea946256ffff9cb5223c2930453
BLAKE2b-256 checksum
How to use checksums
87dda62a96cdc1803ff0e4d4b90cfa787a29e2c049e39da7ebd9f58502ce1895
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/1.5.1

Release history Release notifications | RSS feed

This release

0.5.0 This release

18 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page