Skip to main content

anysolve is a library for executing AnySolve.ai tasks. It needs an API-Key that can be created in the settings of an anysolve.ai account. The settings can be found at https://www.anysolve.ai/settings.

Please note that the execution of an AnySolve.ai task may be chargeable.

Installation

You can install this library by using pip. The library is designed to use only requests as dependency.

Supported Python Versions

Python >= 3.6

Mac/Linux

pip3 install anysolve

Windows

pip.exe install anysolve

Create an access token

You can create an access token at https://www.anysolve.ai/settings/personal-access-tokens

Example Usage

Translation of a text (free)

The following code uses the translation API for text (free):

from anysolve import AnySolve

client = AnySolve(
    "your_api_key"
)

result = client.run(
    "intern-translation-free",
    "1.0.0",
    {
        "source_language": "de",
        "text": "Das ist ein rotes Haus.",
        "target_language": "en",
    },
)

print(result)

https://www.anysolve.ai/tasks/u-ba835df8268fc301-translates-a-text

Introduction from Text

The following code creates an introduction from a text:

import os
from anysolve import AnySolve

anysolve_token = os.environ.get('ANYSOLVE_PERSONAL_ACCESS_TOKEN') # Resolve your personal access token here
client = AnySolve(anysolve_token)
res = client.run('create-introduction','1.0.1', {'text': 'As a swan person I like to go to lakes', 'context': 'You are a creative writer.'})

print(res)

https://www.anysolve.ai/tasks/create-introduction

Create Newspaper Headline from Text

The following creates a newspaper headline by a text:

import os
from anysolve import AnySolve

anysolve_token = os.environ.get('ANYSOLVE_PERSONAL_ACCESS_TOKEN') # Resolve your personal access token here
client = AnySolve(anysolve_token)
res = client.run('create-newspaper-headline','1.0.0', {'text': 'A group of police...', 'lang': 'English', 'context': 'You are a boulevard journalist.'})

print(res)

https://www.anysolve.ai/tasks/create-newspaper-headline

Explain Code

The following code explains a code:

import os
from anysolve import AnySolve

anysolve_token = os.environ.get('ANYSOLVE_PERSONAL_ACCESS_TOKEN') # Resolve your personal access token here
client = AnySolve(anysolve_token)
res = client.run('explain-code','1.0.0', {'code': 'print(\'hello world\')'})

print(res)

https://www.anysolve.ai/tasks/explain-code

Generate SEO Keywords

The following code generates SEO keywords:

import os
from anysolve import AnySolve

anysolve_token = os.environ.get('ANYSOLVE_PERSONAL_ACCESS_TOKEN') # Resolve your personal access token here
client = AnySolve(anysolve_token)
res = client.run('u-ba835df8268fc301-seo-keyword','1.0.0', {'topic': 'A plattform saas platform targeted to AI tasks'})

print(res)

https://www.anysolve.ai/tasks/u-ba835df8268fc301-seo-keyword

Rewrite Text Tone to Be Polite

The following code creates rewrites the text to be polite:

import os
from anysolve import AnySolve

anysolve_token = os.environ.get('ANYSOLVE_PERSONAL_ACCESS_TOKEN') # Resolve your personal access token here
client = AnySolve(anysolve_token)
res = client.run('u-ba835df8268fc301-rewrite-text-tone-to-be-polite','1.0.0', {'text': 'I want you to quit an join my business'})

print(res)

https://www.anysolve.ai/tasks/u-ba835df8268fc301-rewrite-text-tone-to-be-polite

Generate Alternative Titles

The following code generates alternatives to a title:

import os
from anysolve import AnySolve

anysolve_token = os.environ.get('ANYSOLVE_PERSONAL_ACCESS_TOKEN') # Resolve your personal access token here
client = AnySolve(anysolve_token)
res = client.run('u-ba835df8268fc301-generate-alternative-titles','1.0.0', {'title': 'AnySolve.ai - An AI community hub', 'field_of_use': 'Blog post'})

print(res)

https://www.anysolve.ai/tasks/u-ba835df8268fc301-generate-alternative-titles

Create Regex by Description

The following code creates a regex by a description:

import os
from anysolve import AnySolve

anysolve_token = os.environ.get('ANYSOLVE_PERSONAL_ACCESS_TOKEN') # Resolve your personal access token here
client = AnySolve(anysolve_token)
res = client.run('u-ba835df8268fc301-create-regex-by-description','1.0.0', {'requirement': 'allow up to 3 chars and numbers and then *', 'type': 'PCRE'})

print(res)

https://www.anysolve.ai/tasks/u-ba835df8268fc301-create-regex-by-description

Answer Yes/No Question about Text

The following code answers a yes / no question:

import os
from anysolve import AnySolve

anysolve_token = os.environ.get('ANYSOLVE_PERSONAL_ACCESS_TOKEN') # Resolve your personal access token here
client = AnySolve(anysolve_token)
res = client.run('u-ba835df8268fc301-answer-yesno-question-about-text','1.0.0', {'text': 'It is a hot day. Maria is on her way to the lake. She will meet her friends there.', 'question': 'Is the main character of the text female?'})

print(res)

https://www.anysolve.ai/tasks/u-ba835df8268fc301-answer-yesno-question-about-text

Answer Question about Text

The following code answers a question about a text:

import os
from anysolve import AnySolve

anysolve_token = os.environ.get('ANYSOLVE_PERSONAL_ACCESS_TOKEN') # Resolve your personal access token here
client = AnySolve(anysolve_token)
res = client.run('u-ba835df8268fc301-answer-question-about-text','1.0.0', {'question': 'What is the name of the main character?', 'text': 'It is a hot day. Maria is on her way to the lake. She will meet her friends there.'})

print(res)

https://www.anysolve.ai/tasks/u-ba835df8268fc301-answer-question-about-text

Transform Style & Tone

The following code changes the style & tone of a text:

import os
from anysolve import AnySolve

anysolve_token = os.environ.get('ANYSOLVE_PERSONAL_ACCESS_TOKEN') # Resolve your personal access token here
client = AnySolve(anysolve_token)
res = client.run('u-806494eb1fbfb39f-transform-style--tone','1.0.0', {'style': 'Persuasive', 'tone': 'Formal', 'text': 'I want you to quit an join my business'})

print(res)

https://www.anysolve.ai/tasks/u-806494eb1fbfb39f-transform-style–tone

Text Compression

The following code makes a text smaller without loosing too much information:

import os
from anysolve import AnySolve

anysolve_token = os.environ.get('ANYSOLVE_PERSONAL_ACCESS_TOKEN') # Resolve your personal access token here
client = AnySolve(anysolve_token)
res = client.run('u-806494eb1fbfb39f-text-compression','1.0.0', {'text': 'Enter text to compress'})

print(res)

https://www.anysolve.ai/tasks/u-806494eb1fbfb39f-text-compression

Pricing

Please go to https://www.anysolve.ai/pricing and study the specific tasks for prices. You may get free credits on registration and some tasks are free.

Release files for anysolve 1.0.4

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

Source distribution (sdist)

Source distribution for anysolve 1.0.4
File Size Uploaded
anysolve-1.0.4.tar.gz 5.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for anysolve 1.0.4
File Interpreter ABI Platform
anysolve-1.0.4-py2.py3-none-any.whl Python 3, Python 2 none any Details

Total release size: 9.9 kB

Release files / anysolve-1.0.4.tar.gz

Download URL anysolve-1.0.4.tar.gz
Size 5.3 kB
Tags Source
SHA-256 checksum
How to use checksums
426b464d06deae5936c1f70f50f3f4071995e6f6d71d7ea034d0d01ca0d9b9e3
BLAKE2b-256 checksum
How to use checksums
ea88c94b0e7e87a7bb06124856e46967afb579f6f9b9644d19fa2be37c02a03d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.9.17

Release files / anysolve-1.0.4-py2.py3-none-any.whl

Download URL anysolve-1.0.4-py2.py3-none-any.whl
Size 4.6 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
ff27340e0c11553038d9ad1dfe4909f3d11b004fe9e22479721246c225754189
BLAKE2b-256 checksum
How to use checksums
6a8fc93fb4aab4a0a3d7a6a5c0338c3dc8b6b70fabdd254660838480f77aae52
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.9.17

Release history Release notifications | RSS feed

This release

1.0.4 This release

2 release files

1.0.3

2 release files

1.0.2

2 release files

1.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