Skip to main content

Python client for the Pepkio Molarity Solution Calculator API

Project description

Pepkio Molarity Solution Calculator

Python client for the Pepkio Molarity Solution Calculator API: powder mass, single-step dilution volumes, and serial dilution tables with hydrate and purity correction from scripts or notebooks.

What It Does

Preparing solutions at a defined molarity is routine in molecular biology, biochemistry, and cell culture. Researchers weigh solid reagents for stock solutions, dilute concentrated stocks to working concentrations, and plan serial dilution series for standard curves or dose–response experiments.

Spreadsheets and generic molarity calculators often ignore hydrate water in salts (for example CuSO₄·5H₂O), supplier purity on the bottle, or unit conversions between mM and µM. That can lead to under-weighed powder and solutions below the intended concentration.

This package calls the same Pepkio Tools calculation engine as the hosted web application. Use PepkioClient.run() from Python, Jupyter, or automation pipelines to obtain grams to weigh, stock and diluent volumes, serial step tables, plain-language protocol steps, and shareable run links.

Programmatic runs require a network connection and a Pepkio API key. Calculations are not bundled for offline use.

Features

  • Three modes: powder (mass from solid), dilution (C₁V₁ = C₂V₂), serial (multi-step concentration table)
  • Powder mode: anhydrous molecular weight, hydrate notation (e.g. ·5H₂O), and purity percent; returns corrected mass and effective hydrated MW
  • Dilution mode: stock and target concentration (M, mM, uM, nM); stock volume, diluent volume, and dilution factor
  • Serial mode: step count, final volume per tube in µL, concentration and transfer/diluent volumes at each step
  • Plain-language protocol_steps with every run
  • Manifest and named examples: get_manifest, list_examples, get_example_input
  • CLI: pepkio-molarity-solution-calculator manifest and run
  • Configuration via PEPKIO_API_KEY and PEPKIO_API_BASE_URL

Installation

pip install pepkio-molarity-solution-calculator

Set an API key with tools:run scope before calling run():

export PEPKIO_API_KEY="your-key"

Create a key in your Pepkio account API keys settings.

Quick Example

from pepkio_molarity_solution_calculator import PepkioClient

with PepkioClient() as client:
    inp = client.get_example_input("powder_cuso4")
    result = client.run(inp)
    print(result.result["result"]["mass_display"])
    for step in result.result["protocol_steps"]:
        print(step)

CLI:

pepkio-molarity-solution-calculator run --example powder_cuso4

Manifest inspection does not require an API key.

Typical Use Cases

  • Weighing hydrated salts for stock solutions (for example CuSO₄·5H₂O at labeled purity)
  • Diluting concentrated buffers (for example 10× PBS to 1× in a defined final volume)
  • Quick serial dilution estimates (for example 1 M to 1 µM in four steps)
  • Cell culture media and reagent stock preparation
  • Standard curve and qPCR template dilution planning before bench work
  • Scripting repeatable solution prep in notebooks or lab automation pipelines

Scientific Background

To prepare a solution from solid: mass (g) = M × V (L) × MW (g/mol). For hydrated salts, use the effective molecular weight that includes crystal water. Adjust mass upward when bottle purity is below 100%.

For a single dilution, C₁V₁ = C₂V₂ relates stock concentration, final concentration, and volumes. Dilution factor DF = C_stock / C_final.

In serial dilution with constant ratio DF per step, concentration after n steps is Cₙ = C₀ / DFⁿ. The serial mode returns ideal transfer volumes; for pipette-aware rounding and plate maps, use the Pepkio Serial Dilution Planner web tool.

Web Application

For researchers who prefer a graphical interface, an interactive Molarity Solution Calculator is available in the browser.

The web interface adds live results as you type, saved recipes for buffers you prepare regularly, shareable links that restore inputs, one-click handoff from powder result to dilution tab, printable worksheets, and warnings when serial volumes are below practical pipetting limits (with a link to the Serial Dilution Planner).

Documentation and Resources

Source code and issue tracking: github.com/pepkio/pepkio-molarity-solution-calculator

Web application: pepkio.com/tools/molarity-solution-calculator

About Pepkio

Pepkio develops software tools and provides bioinformatics analysis services for life science research. See https://www.pepkio.com for additional tools and services.

Keywords

molarity calculator, molarity solution calculator, solution preparation calculator, powder to solution, mass from molarity, hydrate correction, hydrated salt molarity, purity correction, C1V1=C2V2, dilution calculator, stock dilution volume, dilution factor, buffer dilution, serial dilution calculator, mM to uM dilution, standard curve preparation, qPCR dilution, cell culture media preparation, laboratory protocol, effective molecular weight, pepkio-molarity-solution-calculator, Python molarity API, lab automation solution prep, how much powder to weigh for mM solution, molarity calculator with hydrate correction, adjust mass for reagent purity, how to dilute 10x buffer to 1x, calculate stock and diluent volumes, make CuSO4 5H2O stock solution, quick serial dilution 1 M to 1 uM, Python script calculate powder mass molarity, API for laboratory solution preparation, shareable link restore solution prep parameters, common mistakes weighing hydrated salts

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

pepkio_molarity_solution_calculator-0.1.0.tar.gz (35.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

File details

Details for the file pepkio_molarity_solution_calculator-0.1.0.tar.gz.

File metadata

  • Download URL: pepkio_molarity_solution_calculator-0.1.0.tar.gz
  • Upload date:
  • Size: 35.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.14 {"installer":{"name":"uv","version":"0.11.14","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for pepkio_molarity_solution_calculator-0.1.0.tar.gz
Algorithm Hash digest
SHA256 2d9a519afca6c7e983c99f24566326d4edfb79b1790f5343ad3de2d818c4bcd3
MD5 80cbcbe315feb20fa44c43ebf35f37d6
BLAKE2b-256 bcff0b722887b474fbd26da9037a60e2f9efb1ce6f1b6cbc1014c5761fbfe35b

See more details on using hashes here.

File details

Details for the file pepkio_molarity_solution_calculator-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: pepkio_molarity_solution_calculator-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 9.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.14 {"installer":{"name":"uv","version":"0.11.14","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for pepkio_molarity_solution_calculator-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 9d2211bd408103e619d3851f6412e3c7c006fe5ab928458f784a12acc1f13688
MD5 0fcc88d39efc4612a28689ecc8b6624a
BLAKE2b-256 0e3fc366c18f1d3aa31602b2a4020455625a91e23047d9f39f6327828c3a17fa

See more details on using hashes here.

Supported by

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