Skip to main content

DynamoFL Core Python Client

  • This is a dynamofl package built by DynamoAI to be used with DynamoAI System
  • It's a wrapper to interact with DynamoAI APIs. Example
    • Create a model/AI System, Dataset, Test
    • View Test Details
    • Generate Billing Reports

Installation

$ pip install dynamofl

Usage

from dynamofl import DynamoFL

api_key = os.environ["API_KEY"]
api_host = os.environ["API_HOST"]

dfl = DynamoFL(token=api_key, host=api_host)

Version Compatability

  • DynamoAI has its own releases, and the deployed system knows what release version it's at (applicable from 3.21.0)
    • So for systems older than 3.21.0, we don't do a compatibility check
  • There are certain changes that are not backward compatible, hence the SDK might not be compatible with all the versions of the DynamoAI System
  • The SDK is smart enough to validate at the time of initialization as to whether it's compatible with the DynamoAI system or not and accordingly raise an error if it's incompatible

What SDK Version was this compatibility engine introduced in?

  • 0.1.0
  • Since the version compatibility engine is introduced in this version, the previous versions won't raise any error even if incompatible so we'd recommend you to upgrade to atleast 0.1.0 version of the sdk

What to do when the SDK is incompatible with the DynamoAI system being used with it?

We recommend using the compatible version of the sdk with the DynamoAI system you're running using the table below

SDK Version Compatibility

As mentioned above, we didn't have a compatibility engine before so the versions before 0.1.0 won't throw an error at instantiation even if they're incompatible

SDK Version Compatible DynamoAI System Version
0.1.X <= 3.21.X
0.2.X <= 3.23.X
1.0.X >= 3.23.X & < 3.24.0
2.0.0 >= 3.24.X & < 3.25.0
3.0.0 >= 3.25.X & < 3.26.0
3.1.0 >= 3.26.X & < 3.27.0
3.1.1 >= 3.26.X & < 3.27.0

Changelog

0.1.1

  • Removes the ALLOWED_PII_CLASSES validation from the sdk and rely on DynamoAI platform solely for the validation
    • This will introduce a delay in the feedback around valid PII classes that can be used for the attacks
    • So, please refer to the documentation to see what classes you can use for validation based on the DynamoAI release that you're at!
    • But it's for the longer good as the lesser the business logic in the core sdk, the lower chances of it being incompatible with the DynamoAI product release
  • Make GPU parameter truly optional for system policy compliance tests

0.1.2 & 0.1.3

  • Allow patch updates for requests package while preventing minor and major version updates

0.2.0

  • Adds compatibility with the new releases

1.0.0

  • Switch to new test endpoints as old ones are deprecated and removed in 3.23

2.0.0

  • Allow CPU Config as compute for Launching Attacks and Set Default to CPU Single Core, 2GB Memory
  • Supported only on 3.24.x >=

3.0.0

  • Universal Keys Support
  • Auth Data Management Methods
  • Remote Model Creation Update
  • Gemini AI System Creation Method
  • Bedrock AI System Creation Method
  • Supported only on 3.25.x >=

3.1.1

  • Expose optional perturbation_count on create_system_policy_compliance_test (default 1, allowed range 1-10)
    • Number of perturbed variants generated per base prompt for each selected perturbation method
    • Mapped to the same per-method attack.perturbation_count dict the create-test UI already sends
    • Ignored when enable_perturbations is False
  • Compatible with DynamoAI 3.26.x (same as 3.1.0)

3.1.0

  • Expose synthetic-data controls on create_policy_jailbreak_test as optional kwargs: min_num_input_chars, n_attack_areas, n_base_prompts, policy_language, use_case (existing max_num_input_chars kwarg unchanged)
  • Expose synthetic-data controls on create_system_policy_compliance_test as optional kwargs: policies_language, num_topics, num_complaint_prompts, num_noncompliant_prompts, min_num_base_prompt_chars, max_num_base_prompt_chars, use_case
  • Bounds for each kwarg are validated server-side; refer to the docstrings for the allowed ranges and the Literal["en", "ja", "zh"] language allow-list
  • Breaking change: trims the test-creation surface to the four supported attack types. The following create_*_test methods have been removed from the DynamoFL client:
    • create_performance_test
    • create_membership_inference_test
    • create_pii_inference_test
    • create_pii_reconstruction_test
    • create_hallucination_test
    • create_pii_extraction_test
    • create_rag_hallucination_test
    • create_sequence_extraction_test
    • create_cybersecurity_compliance_test
    • create_bias_toxicity_test
    • create_prompt_extraction_test
    • create_multilingual_jailbreak_test
    • create_rag_test
  • The supported test creators going forward are:
    • create_static_jailbreak_test — Static Jailbreak
    • create_adaptive_jailbreak_test — Adaptive Jailbreak (Tree of Attacks)
    • create_policy_jailbreak_test — Policy Jailbreak
    • create_system_policy_compliance_test — Guardrail Benchmark (test_type="guardrail_benchmark")
  • Drops the now-unused vector_db imports from src.py (the ChromaDB, LlamaIndexDB, LlamaIndexWithChromaDB, PostgresVectorDB, and CustomRagDB classes remain exported from the top-level dynamofl package and are unaffected)
  • Bumps the compatible DynamoAI server version to 3.26.x (drops 3.25.x support)

Metadata

Release files for dynamofl 3.1.1

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

Source distribution (sdist)

Source distribution for dynamofl 3.1.1
File Size Uploaded
dynamofl-3.1.1.tar.gz 47.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for dynamofl 3.1.1
File Interpreter ABI Platform
dynamofl-3.1.1-py3-none-any.whl Python 3 none any Details

Total release size: 109.0 kB

Release files / dynamofl-3.1.1.tar.gz

Download URL dynamofl-3.1.1.tar.gz
Size 47.9 kB
Tags Source
SHA-256 checksum
How to use checksums
50e8c59a92528faaf9afeb1e249fee0ab5d3e1de0bbcf7deb31480249159c98d
BLAKE2b-256 checksum
How to use checksums
91d36ca84661bd6c8460b4c15d2933b4987c72149f924ea302e867b8b0de74d2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.10.20

Release files / dynamofl-3.1.1-py3-none-any.whl

Download URL dynamofl-3.1.1-py3-none-any.whl
Size 61.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
a641f4d4331bd77bc56a0bed4e31c21cd4f4835905f37d29133cfe9508d3fca0
BLAKE2b-256 checksum
How to use checksums
69aa6633b5997bba7c781cca3791b1bd280ec327fdd4e5b33060b61cf561699a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.10.20

Release history Release notifications | RSS feed

3.2.1

2 release files

3.2.0

2 release files

3.1.2

2 release files

This release

3.1.1 This release

2 release files

3.1.0

2 release files

3.0.0

2 release files

2.0.0

2 release files

1.0.0

2 release files

0.2.0

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release files

0.0.96

2 release files

0.0.95

2 release files

0.0.94

2 release files

0.0.93

2 release files

0.0.92

2 release files

0.0.87

2 release files

0.0.86

2 release files

0.0.85

2 release files

0.0.84

2 release files

0.0.82

2 release files

0.0.81

2 release files

0.0.80

2 release files

0.0.79

2 release files

0.0.75

2 release files

0.0.74

2 release files

0.0.73

2 release files

0.0.71

2 release files

0.0.70

2 release files

0.0.69

2 release files

0.0.67

2 release files

0.0.66

2 release files

0.0.65

2 release files

0.0.64

2 release files

0.0.63

2 release files

0.0.62

2 release files

0.0.60

2 release files

0.0.59

2 release files

0.0.57

2 release files

0.0.53

2 release files

0.0.52

2 release files

0.0.51

2 release files

0.0.46

2 release files

0.0.45

2 release files

0.0.40

2 release files

0.0.39

2 release files

0.0.38

2 release files

0.0.37

2 release files

0.0.36

2 release files

0.0.31

2 release files

0.0.30

2 release files

0.0.29

2 release files

0.0.27

2 release files

0.0.23

2 release files

0.0.21

2 release files

0.0.20

2 release files

0.0.19

2 release files

0.0.18

2 release files

0.0.17

2 release files

0.0.16

2 release files

0.0.15

2 release files

0.0.9

2 release files

0.0.8

2 release files

0.0.7

2 release files

0.0.6

2 release files

0.0.5

2 release files

0.0.4

2 release files

0.0.3

2 release files

0.0.2

2 release files

0.0.1

2 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