Skip to main content

Python client for the hosted Greenophy ESG substantiveness classification API.

Project description

Greenophy

Python helper for calling the hosted Greenophy ESG substantiveness API.

Installation

pip install .

Usage

from greenophy import SubstantivenessClient

# Uses the default hosted base URL. Add an API key if your partner token requires it.
client = SubstantivenessClient(api_key="your-shared-token")

results = client.classify_esg_text("We transitioned 70% of our fleet to EVs in 2023.\nWe value teamwork.")
for item in results:
    print(item.index, item.label_name, item.sentence)

Use client.close() when you are done (or create it with a context manager).

Generic classification

Need a neutral rubric instead of the ESG-focused labels? Call classify_generic_text("..."), which targets /api/generic_classification.

Environment-variable configuration

You can also set connection details once for the whole environment. Override the hosted endpoint only if you are targeting a private deployment.

export GREENOPHY_API_KEY="your-shared-token"
# export GREENOPHY_API_BASE_URL="https://your-private-service"  # optional

Then simply instantiate SubstantivenessClient() without arguments.

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

greenophy-0.1.4.tar.gz (3.1 kB view details)

Uploaded Source

Built Distribution

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

greenophy-0.1.4-py3-none-any.whl (3.4 kB view details)

Uploaded Python 3

File details

Details for the file greenophy-0.1.4.tar.gz.

File metadata

  • Download URL: greenophy-0.1.4.tar.gz
  • Upload date:
  • Size: 3.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.7

File hashes

Hashes for greenophy-0.1.4.tar.gz
Algorithm Hash digest
SHA256 3cdc717b24a87856e44be78d6366b61036d717e85279f0dfb7d31c2ba3bfe8db
MD5 fe9a990245c34f78f13069984c2aa071
BLAKE2b-256 51caa16227939d4c4ca172a42ca22cb29303a034c080be5a6a87e3031391139b

See more details on using hashes here.

File details

Details for the file greenophy-0.1.4-py3-none-any.whl.

File metadata

  • Download URL: greenophy-0.1.4-py3-none-any.whl
  • Upload date:
  • Size: 3.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.7

File hashes

Hashes for greenophy-0.1.4-py3-none-any.whl
Algorithm Hash digest
SHA256 f58ac8662f782da032dce2a76fabc56b98ffaf7dbc80e4ae1489b9ce710e7bf6
MD5 3b0234df8a14c8c4ae1f9c273590b6c5
BLAKE2b-256 ad0a90da8006cd01fcd9722e8291ae06345b354e43204b8fbb736a959b604d66

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