Skip to main content

Python client for Louie.ai (Graphistry's AI investigation platform)

Project description

LouieAI Python Client

CI PyPI Version License

AI-powered investigation platform for natural language data analysis.

🚀 Get Started in 30 Seconds

# 1. Install
# pip install louieai

# 2. Authenticate with your PyGraphistry server
import graphistry
graphistry.register(
    api=3,
    server="hub.graphistry.com",  # or your enterprise server
    username="bob@company.com",   # your actual username
    password="MySecurePass456!"   # your actual password
)

# 3. Start analyzing with natural language
from louieai.notebook import lui
lui("Show me all suspicious transactions from the last week")

# 4. Access the results
print(lui.text)  # Natural language explanation
df = lui.df      # Pandas DataFrame with the data

Install & Authenticate

pip install louieai

Authentication

LouieAI uses PyGraphistry for authentication. You'll need a free account:

  1. Get PyGraphistry credentials at hub.graphistry.com (free signup)
  2. Set environment variables or authenticate in code:
# Option 1: Environment variables (recommended for notebooks/scripts)
export GRAPHISTRY_USERNAME="sarah@analytics.com"
export GRAPHISTRY_PASSWORD="Analytics2024!"
export GRAPHISTRY_SERVER="hub.graphistry.com"  # or "my-company.graphistry.com"

# Optional: Custom Louie endpoint (defaults to https://louie.ai)
export LOUIE_URL="https://louie-enterprise.company.com"
# Option 2: Authenticate in code
import graphistry
graphistry.register(
    api=3, 
    server="hub.graphistry.com",  # or your enterprise server
    username="mike@investigations.org", 
    password="Secure123!"
)

# Optional: Use custom Louie server
from louieai import LouieClient
client = LouieClient(
    server_url="https://louie.ai",  # Louie service endpoint (default)
    server="hub.graphistry.com"      # PyGraphistry server (default)
)

Quick Start

# First, authenticate with your PyGraphistry server
import graphistry
graphistry.register(
    api=3,
    server="hub.graphistry.com",  # or your private server
    username="alice@example.com",
    password="SecurePassword123!"
)

# Now import and use LouieAI (two options)

# Option 1: New clean import (recommended)
import louieai
lui = louieai()  # Automatically uses PyGraphistry auth

# Option 2: Traditional import
from louieai.notebook import lui

# Ask questions in natural language  
lui("Find accounts sharing payment methods or shipping addresses")

# Get fraud insights instantly
print(lui.text)
# Output: "Found 23 suspicious account clusters sharing payment/shipping details:
# 
# **Payment Card Sharing**:
# • Card ending 4789: Used by 8 different accounts in 3 days
# • Card ending 2156: 5 accounts, all created within same hour
# 
# **Address Clustering**:
# • 123 Oak St: 12 accounts using same shipping address
# • suspicious_email@temp.com: 7 accounts with similar email patterns
# 
# **Risk Assessment**: 67% likely promotional abuse, 23% payment fraud"

# Access the connection data
clusters_df = lui.df
if clusters_df is not None:
    print(clusters_df.head())
    #     account_id shared_payment shared_address  cluster_size  risk_score
    # 0   user_1234      card_4789    123_oak_st            12        7.2
    # 1   user_5678      card_4789    456_elm_ave            8        6.8  
    # 2   user_9012      card_2156    123_oak_st            5        8.1

Documentation

Links

Contributing

We welcome contributions! See CONTRIBUTING.md for guidelines.

For developers: Check out DEVELOP.md for technical setup and development workflow.

License

Apache 2.0 - see LICENSE

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

louieai-0.5.2.tar.gz (363.6 kB view details)

Uploaded Source

Built Distribution

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

louieai-0.5.2-py3-none-any.whl (33.6 kB view details)

Uploaded Python 3

File details

Details for the file louieai-0.5.2.tar.gz.

File metadata

  • Download URL: louieai-0.5.2.tar.gz
  • Upload date:
  • Size: 363.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for louieai-0.5.2.tar.gz
Algorithm Hash digest
SHA256 62da9f1a3a927e4d9a5403c27ce5cb14088faab346548b5e17bc1f321b97ae65
MD5 c9fd8eba8d008a306e90e13938940539
BLAKE2b-256 91d863d09ad2b19845e64a88bb973abec46b6deb818069788c400f5f36b94a91

See more details on using hashes here.

Provenance

The following attestation bundles were made for louieai-0.5.2.tar.gz:

Publisher: publish.yml on graphistry/louie-py

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file louieai-0.5.2-py3-none-any.whl.

File metadata

  • Download URL: louieai-0.5.2-py3-none-any.whl
  • Upload date:
  • Size: 33.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for louieai-0.5.2-py3-none-any.whl
Algorithm Hash digest
SHA256 987755b29b2f2621ec59e7773d81d154dd248963b7592cd26ae740ce05c47745
MD5 cf099c04f3a206e8bdd91034ff5b2191
BLAKE2b-256 ffbbe00e02da709a0af48004340a0320bb735fc12bf8bf22ce624aaa5c7e0e4e

See more details on using hashes here.

Provenance

The following attestation bundles were made for louieai-0.5.2-py3-none-any.whl:

Publisher: publish.yml on graphistry/louie-py

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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