Skip to main content

TBD

Project description

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.

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

ka3005p-0.5.0.tar.gz (485.9 kB view details)

Uploaded Source

Built Distributions

ka3005p-0.5.0-cp312-none-win_amd64.whl (712.5 kB view details)

Uploaded CPython 3.12Windows x86-64

ka3005p-0.5.0-cp312-none-win32.whl (644.7 kB view details)

Uploaded CPython 3.12Windows x86

ka3005p-0.5.0-cp312-cp312-macosx_11_0_arm64.whl (247.8 kB view details)

Uploaded CPython 3.12macOS 11.0+ ARM64

ka3005p-0.5.0-cp312-cp312-macosx_10_12_x86_64.whl (254.8 kB view details)

Uploaded CPython 3.12macOS 10.12+ x86-64

ka3005p-0.5.0-cp311-none-win_amd64.whl (712.2 kB view details)

Uploaded CPython 3.11Windows x86-64

ka3005p-0.5.0-cp311-none-win32.whl (644.0 kB view details)

Uploaded CPython 3.11Windows x86

ka3005p-0.5.0-cp311-cp311-macosx_11_0_arm64.whl (248.0 kB view details)

Uploaded CPython 3.11macOS 11.0+ ARM64

ka3005p-0.5.0-cp311-cp311-macosx_10_12_x86_64.whl (255.0 kB view details)

Uploaded CPython 3.11macOS 10.12+ x86-64

ka3005p-0.5.0-cp310-none-win_amd64.whl (712.2 kB view details)

Uploaded CPython 3.10Windows x86-64

ka3005p-0.5.0-cp310-none-win32.whl (644.1 kB view details)

Uploaded CPython 3.10Windows x86

ka3005p-0.5.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (364.8 kB view details)

Uploaded CPython 3.10manylinux: glibc 2.17+ x86-64

ka3005p-0.5.0-cp310-cp310-macosx_11_0_arm64.whl (248.1 kB view details)

Uploaded CPython 3.10macOS 11.0+ ARM64

ka3005p-0.5.0-cp310-cp310-macosx_10_12_x86_64.whl (255.1 kB view details)

Uploaded CPython 3.10macOS 10.12+ x86-64

ka3005p-0.5.0-cp39-none-win_amd64.whl (712.4 kB view details)

Uploaded CPython 3.9Windows x86-64

ka3005p-0.5.0-cp39-none-win32.whl (644.3 kB view details)

Uploaded CPython 3.9Windows x86

ka3005p-0.5.0-cp38-none-win_amd64.whl (712.6 kB view details)

Uploaded CPython 3.8Windows x86-64

ka3005p-0.5.0-cp38-none-win32.whl (644.3 kB view details)

Uploaded CPython 3.8Windows x86

File details

Details for the file ka3005p-0.5.0.tar.gz.

File metadata

  • Download URL: ka3005p-0.5.0.tar.gz
  • Upload date:
  • Size: 485.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: maturin/1.5.1

File hashes

Hashes for ka3005p-0.5.0.tar.gz
Algorithm Hash digest
SHA256 e4b723928bd8497f7b1a5863623b26be061e77c6d37bb645387fbd2f626e7329
MD5 f7da9b7eee489bd097ad8a977124a49f
BLAKE2b-256 c802092d0d38bbf0abe114a775fd972828306e297ef201c87435b8a9e182af50

See more details on using hashes here.

File details

Details for the file ka3005p-0.5.0-cp312-none-win_amd64.whl.

File metadata

  • Download URL: ka3005p-0.5.0-cp312-none-win_amd64.whl
  • Upload date:
  • Size: 712.5 kB
  • Tags: CPython 3.12, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: maturin/1.5.1

File hashes

Hashes for ka3005p-0.5.0-cp312-none-win_amd64.whl
Algorithm Hash digest
SHA256 58cc5843bac8af23ce5997e264e56281e7eb714bb6e82bd577a553e2b58b23e0
MD5 682ae7a4be01c1e07f8bacf1659277b9
BLAKE2b-256 93ab6b29096607bce45ef2a6b92adce907ecd97e7958685fd4203902cd281097

See more details on using hashes here.

File details

Details for the file ka3005p-0.5.0-cp312-none-win32.whl.

File metadata

  • Download URL: ka3005p-0.5.0-cp312-none-win32.whl
  • Upload date:
  • Size: 644.7 kB
  • Tags: CPython 3.12, Windows x86
  • Uploaded using Trusted Publishing? No
  • Uploaded via: maturin/1.5.1

File hashes

Hashes for ka3005p-0.5.0-cp312-none-win32.whl
Algorithm Hash digest
SHA256 eb61a8f56014cbb911aab6a1706f0ae4dafed9dd0e857b05c90d4d0068b6239b
MD5 ad175310194b9a20334f30cb0fc7991d
BLAKE2b-256 92146ca046bfd2252d035769f43bea0cecc7b6d780368bc1f8487dbed3d41f8c

See more details on using hashes here.

File details

Details for the file ka3005p-0.5.0-cp312-cp312-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for ka3005p-0.5.0-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 f6df3bd0a3378129fb8b3222cd9030a3b3e3cf572a869b6048e552bfd970e92f
MD5 8c41faf60f006ca03e56800c5a90d649
BLAKE2b-256 186ab098048cfbfd1105dd10c0bb4eedea1c079f76851f664a73d5372f0cb1c2

See more details on using hashes here.

File details

Details for the file ka3005p-0.5.0-cp312-cp312-macosx_10_12_x86_64.whl.

File metadata

File hashes

Hashes for ka3005p-0.5.0-cp312-cp312-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 826e95a2deeb8396f34d14e199a57dbdf1e5b300938c8876a0c7d4ee504ee540
MD5 47b97c1899bc828be5f023d81684252f
BLAKE2b-256 75ccffb458cc32a6df84ed240dc09534e2cd0819a4cada43e9b60d6dd0bc28b3

See more details on using hashes here.

File details

Details for the file ka3005p-0.5.0-cp311-none-win_amd64.whl.

File metadata

  • Download URL: ka3005p-0.5.0-cp311-none-win_amd64.whl
  • Upload date:
  • Size: 712.2 kB
  • Tags: CPython 3.11, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: maturin/1.5.1

File hashes

Hashes for ka3005p-0.5.0-cp311-none-win_amd64.whl
Algorithm Hash digest
SHA256 1b6c4aa3ba6f399d890067b886f8929e256a90b0098c2201951af8730393a9e2
MD5 31beae682c347454bbc7243430d07f9a
BLAKE2b-256 e942a019a4c4ab2a94ed3f6e06b3330a7b57258df251fb4ebf99dc3d78895026

See more details on using hashes here.

File details

Details for the file ka3005p-0.5.0-cp311-none-win32.whl.

File metadata

  • Download URL: ka3005p-0.5.0-cp311-none-win32.whl
  • Upload date:
  • Size: 644.0 kB
  • Tags: CPython 3.11, Windows x86
  • Uploaded using Trusted Publishing? No
  • Uploaded via: maturin/1.5.1

File hashes

Hashes for ka3005p-0.5.0-cp311-none-win32.whl
Algorithm Hash digest
SHA256 9762f257da5f8f16993fb5bb9c50fcba229f7df3dc592a088a64df0b1d06be4a
MD5 75b8485f9c57bbcb0408db04b1b1b9d1
BLAKE2b-256 dc173a11ddfbb35c31fc00917c8317e02873e30fcd6e45f8414359092ada2a8c

See more details on using hashes here.

File details

Details for the file ka3005p-0.5.0-cp311-cp311-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for ka3005p-0.5.0-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 9ab1e137c2f3228e6a199b7eed6865a89f487e74e59b56be6400ddb68ef2fd58
MD5 f4e8e4b364d0bfdd562cfd5ac06bc751
BLAKE2b-256 9be6e9fd457fd2e98d7b330a6c4eb6905451a862002ef355a7a22bccc20d1d98

See more details on using hashes here.

File details

Details for the file ka3005p-0.5.0-cp311-cp311-macosx_10_12_x86_64.whl.

File metadata

File hashes

Hashes for ka3005p-0.5.0-cp311-cp311-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 14e81defed469e42b1ce4448fdef067035c68e33c715b530c477eac09e13d8ab
MD5 641f2c8f69f4c497265d7de444d2ff7e
BLAKE2b-256 ca2ce1819771a14a8320f867a787ebc8ec3bc7653758fe754cdacc8f9c9a79b9

See more details on using hashes here.

File details

Details for the file ka3005p-0.5.0-cp310-none-win_amd64.whl.

File metadata

  • Download URL: ka3005p-0.5.0-cp310-none-win_amd64.whl
  • Upload date:
  • Size: 712.2 kB
  • Tags: CPython 3.10, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: maturin/1.5.1

File hashes

Hashes for ka3005p-0.5.0-cp310-none-win_amd64.whl
Algorithm Hash digest
SHA256 9803dc6a904430c84c6cc6b7b49960dd91a57149903bac5077bce772eccdeee3
MD5 661cec3e902fecc526fad59bc38455bd
BLAKE2b-256 ff4f48b20f21ab86a2ed26f65f76d0e9bd41bf45140963065af17c7ffc3946a6

See more details on using hashes here.

File details

Details for the file ka3005p-0.5.0-cp310-none-win32.whl.

File metadata

  • Download URL: ka3005p-0.5.0-cp310-none-win32.whl
  • Upload date:
  • Size: 644.1 kB
  • Tags: CPython 3.10, Windows x86
  • Uploaded using Trusted Publishing? No
  • Uploaded via: maturin/1.5.1

File hashes

Hashes for ka3005p-0.5.0-cp310-none-win32.whl
Algorithm Hash digest
SHA256 b1cb4cd0c711a6f6cd97c6c3938d73cbeae93c114fda90e099392b08914bcf9c
MD5 db665507a44bd58c444481580485a003
BLAKE2b-256 560eaa154717471f61102e021c5eb751ba7ce5c9fff680bf04f175d790d6313a

See more details on using hashes here.

File details

Details for the file ka3005p-0.5.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for ka3005p-0.5.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 20e4dda6369a310f1e5217f9bee9366c18cb858731c502295aedd8e64657a9ac
MD5 63d0270a0313083ee8cd1565b5a15f91
BLAKE2b-256 378fa76b1f6a64e888f8491f9c2b00b14cc00cb745451014a37df4b8baf1f21c

See more details on using hashes here.

File details

Details for the file ka3005p-0.5.0-cp310-cp310-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for ka3005p-0.5.0-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 4eee61565e0e56cd0a3334641894e70699869b2e3bb5146c99d90712814b4e0a
MD5 b7e1c9119399cd1ce5099f998a424bd5
BLAKE2b-256 ec41731d40b0c6e77ca7e022a1e68711eed79b126c76ce1b11ed07b86fbabdbb

See more details on using hashes here.

File details

Details for the file ka3005p-0.5.0-cp310-cp310-macosx_10_12_x86_64.whl.

File metadata

File hashes

Hashes for ka3005p-0.5.0-cp310-cp310-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 c16232156c39663203bd7c61006a031538169fd6fd29ef801c6881231cead313
MD5 77f7d846fa018561bf8c9a8c795cf3ca
BLAKE2b-256 fc76d0f6a23ba5d56848a7a70be1125f98d887ad127f54b926895d5b1a4ce1b9

See more details on using hashes here.

File details

Details for the file ka3005p-0.5.0-cp39-none-win_amd64.whl.

File metadata

  • Download URL: ka3005p-0.5.0-cp39-none-win_amd64.whl
  • Upload date:
  • Size: 712.4 kB
  • Tags: CPython 3.9, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: maturin/1.5.1

File hashes

Hashes for ka3005p-0.5.0-cp39-none-win_amd64.whl
Algorithm Hash digest
SHA256 9d2c40d5be8dde56019b7bf62e97122d4b706a7301a90346fff89944e9c265b1
MD5 a024922d103b25d7d080970be810fb78
BLAKE2b-256 205b2cd2f74d693657746fcf1479c11a65411a6a9b680a789003196c239a24d4

See more details on using hashes here.

File details

Details for the file ka3005p-0.5.0-cp39-none-win32.whl.

File metadata

  • Download URL: ka3005p-0.5.0-cp39-none-win32.whl
  • Upload date:
  • Size: 644.3 kB
  • Tags: CPython 3.9, Windows x86
  • Uploaded using Trusted Publishing? No
  • Uploaded via: maturin/1.5.1

File hashes

Hashes for ka3005p-0.5.0-cp39-none-win32.whl
Algorithm Hash digest
SHA256 239403c18ab549a82b5234838cbcf7a91ae7e244e4f37b658d754d79906285c9
MD5 6a888ca736830ef069c155d99c8bfafc
BLAKE2b-256 118d41a7868f629ebb8c0aada951d9db1763d47a2531bebf9d07206fe0d7e03b

See more details on using hashes here.

File details

Details for the file ka3005p-0.5.0-cp38-none-win_amd64.whl.

File metadata

  • Download URL: ka3005p-0.5.0-cp38-none-win_amd64.whl
  • Upload date:
  • Size: 712.6 kB
  • Tags: CPython 3.8, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: maturin/1.5.1

File hashes

Hashes for ka3005p-0.5.0-cp38-none-win_amd64.whl
Algorithm Hash digest
SHA256 dacb007af7a5397d5d55581731318d964dbda362fdaa6ead6651d98cd1a37f43
MD5 f8fe71f55bbab0a90289e92bd8c219da
BLAKE2b-256 aabc2e72e049cfe2097ab29e8529a32892386c1cc1923eba2957fe35e77e260d

See more details on using hashes here.

File details

Details for the file ka3005p-0.5.0-cp38-none-win32.whl.

File metadata

  • Download URL: ka3005p-0.5.0-cp38-none-win32.whl
  • Upload date:
  • Size: 644.3 kB
  • Tags: CPython 3.8, Windows x86
  • Uploaded using Trusted Publishing? No
  • Uploaded via: maturin/1.5.1

File hashes

Hashes for ka3005p-0.5.0-cp38-none-win32.whl
Algorithm Hash digest
SHA256 cb83bbf2bf3da21ee4ba5b893b1546cd40d4bea946256ffff9cb5223c2930453
MD5 0f19e8b5ecb0a289b252560883abcc40
BLAKE2b-256 87dda62a96cdc1803ff0e4d4b90cfa787a29e2c049e39da7ebd9f58502ce1895

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page