Skip to main content

Antigranular Enterprise: Secure, Privacy-Preserving Data Science in Jupyter and Python Environments

The antigranular_enterprise package is a specialized client designed for secure and private interactions with the Antigranular Enterprise platform. It supports data analysis and model training in both Jupyter notebook and standard Python interactive shell environments, emphasizing privacy and data protection. This documentation provides guidance on installing, configuring, and utilizing the client package to fully integrate the capabilities of Antigranular Enterprise into your data science workflows.

Installation

To integrate Antigranular Enterprise with your environment, install the package using pip:

pip install antigranular_enterprise

This command installs the antigranular_enterprise package and its necessary dependencies, setting up your environment for secure, privacy-preserving data science operations.

Configuration

Initial Configuration

Configure the package to communicate with your Antigranular Enterprise instance. Essential parameters include:

  • AGENT Jupyter Server URL: URL for the proxy server routing requests to the Antigranular platform.
  • AGENT Jupyter Server Port: Port on which the proxy listens.
  • AGENT Console URL: URL for accessing the Antigranular management console.
  • TLS Enabled: Set to true if TLS is enabled for the proxy to ensure secure communication.

Configuration Methods

Configure your environment to interact with the Antigranular Enterprise platform in a way that best suits your setup and preferences.

Direct Configuration via UI URL

This is the simplest and recommended method for configuration:

  1. Navigate to the UI Configuration Page: Open your browser and visit https://<ui_url>/config/client.

  2. Copy the Configuration Code: The page will display a pre-formatted configuration snippet.

  3. Execute the Configuration Code: Run the copied code in your environment to automatically load the configuration.

    import antigranular_enterprise as ag
    ag.load_config("https://<ui_url>/config/client", profile='default')
    

Using write_config

Alternatively, you can manually set up the configuration:

  1. Import the Package: Begin by importing antigranular_enterprise.

    import antigranular_enterprise as ag
    
  2. Write the Configuration:

    Save your configuration settings using the write_config method:

    ag.write_config(profile='default', yaml_config="""
    agent_jupyter_url: <Jupyter URL>
    agent_jupyter_port: <Jupyter Port>
    agent_console_url: <Console URL>
    tls_enabled: true
    """)
    

    Replace placeholders with the appropriate values for your environment.

Client Login and Execution

Jupyter Notebook

Login

Log in to the Antigranular Enterprise services from Jupyter notebooks:

client = ag.login("<api_key>")

After entering your API key, a UI notification or link will prompt you for approval. Once approved, your session starts, allowing secure interactions with the Antigranular platform.

Executing Commands

In Jupyter notebooks, use the %%ag magic command to execute code securely on the server:

%%ag
ag_print("hello", "world")

Python Interactive Shell

Login and Execution Script

This script demonstrates a simple login to the Antigranular server, executes a basic print command, and displays the server's response directly.

script.py:

import antigranular_enterprise as ag

# Login and execute a remote command
session = ag.login("Your_API_Key")
response = session.execute("ag_print('Hello', 'World!')")
print(response)

# Export a server variable to the local environment, passing the globals() dictionary to the execute method
session.execute("var = 'test'; export(var, 'varlocal')", globals())
print(varlocal)  # Outputs: test

# Terminate the session
terminate_session_response = session.terminate_session()
print(terminate_session_response)  # Outputs: {'status': 'ok'}

Output:

> python script.py
Connected to Antigranular server session id: <masked>
Hello World!
Setting up exported variable in local environment: varlocal
test
{'status': 'ok'}

Supported Methods for both Jupyter and Non-Jupyter Environments

All package methods are supported within these sessions, including:

  • interrupt_kernel(): Interrupts the currently running kernel.
  • terminate_session(): Terminates the session and cleans up resources.
  • privacy_odometer(): Returns the amount of epsilon and delta used.
  • private_import(): Imports a user-provided model or dataset into the AG server securely.

Features and Usage

The antigranular_enterprise package offers a suite of features for secure data analysis and model training, with robust support for privacy regulations. It is designed to integrate seamlessly into Jupyter notebooks and Python interactive shells, enhancing the data science workflow with privacy-preserving capabilities.

For further information or support, please consult the Antigranular Enterprise platform's detailed documentation or contact our support team directly.

Metadata

Release files for antigranular-enterprise 2.3.5

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

Source distribution (sdist)

Source distribution for antigranular-enterprise 2.3.5
File Size Uploaded Provenance Actions
antigranular_enterprise-2.3.5.tar.gz 1.9 MB Without provenance Details for antigranular_enterprise-2.3.5.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for antigranular-enterprise 2.3.5
File Interpreter ABI Platform Actions
antigranular_enterprise-2.3.5-py3-none-any.whl Python 3 none any Details for antigranular_enterprise-2.3.5-py3-none-any.whl

Total release size: 1.9 MB

Release files / antigranular_enterprise-2.3.5.tar.gz

Download URL antigranular_enterprise-2.3.5.tar.gz
Size 1.9 MB
Tags Source
SHA-256 checksum
How to use checksums
7dbe2d617b1e686881ea5c8879ff1179721f7a655c301eed0af72d53449c94c4
BLAKE2b-256 checksum
How to use checksums
3bc5dae89a37403ee3ddb43b84756ffa1108596e7efec0b88d4340fc4f2db302
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.10.17

Release files / antigranular_enterprise-2.3.5-py3-none-any.whl

Download URL antigranular_enterprise-2.3.5-py3-none-any.whl
Size 32.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
dd3e35be681983ea32a6b31db40356db621f21b3aaee683332b5243d855fcbb2
BLAKE2b-256 checksum
How to use checksums
6fd5fd7e776f2ace6a82c3bb5aad01d2f41d7d3c2fe229a417cfd85d323074e3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.10.17

Security for antigranular-enterprise 2.3.5

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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