Skip to main content
Version: 2.0

Introduction

Using the SDK

To use our API, you will need a personal key, refered as API_KEY. Get your free API_KEY on your Dashboard. Install using Python Software Developpement Kit :

pip install lettria

Then you can import Lettria and add you API Key and start using the API.

# First import the Lettria library
import lettria

# Add your personal API key or use the
nlp = lettria.NLP(api_key)

# Next add your document. You can also load results by using the nlp.load_results() method
nlp.add_document([sentence_1, sentence_2])

# Saving your results will enable you to use the nlp.load_results() method rather than having to add your document for each analysis
nlp.save_results('my_results.jsonl')

# Here is example of extracting the strings from your document
for document in nlp:
print(document.str)

Check out our tutorial for a step-by-step walk through on how to get started with the Python SDK ๐Ÿ‘จ๐Ÿปโ€๐Ÿ’ป

Check the official sources for more information and documentation on how to extract key informations using our SDK : https://github.com/Lettria/sdk-python