intramove


Nameintramove JSON
Version 0.0.15 PyPI version JSON
download
home_pagehttps://github.com/abdelatifsd/intramove
SummaryA client for interacting with Intramove.ai API
upload_time2022-12-29 20:11:18
maintainer
docs_urlNone
authorAbdellatif Dalab
requires_python>=3.6
license
keywords python deep learning finance text classification text analysis sentiment
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            
# Intramove (Alpha Version)

A client for interacting with Intramove.ai API

Developed by Abdellatif Dalab 2022

##  How to get access

Purchasing Credits

```python
from intramove.intramove import Intramove

imove = Intramove()

print(imove.get_available_packages()) # Displays all the available product packages 
# ["headlines-100","articles-100"]

# Opens a web browsers with a stripe payment link  - if it doesn't, you can simply run the link in a browser
# An account with your checkout email and name will be automatically registered in intramove's database
url, session_details = imove.buy_package(product="headlines-100", quantity=1) 
url, session_details = imove.buy_package(product="articles-100", quantity=1) 

```

Once purchase is done

```python
from intramove.intramove import Intramove

imove = Intramove()

# Using the same email and name from checkout, get your unique ID
my_id = imove.get_id(email="dan@gmail.com", name="dan")["client_id"]

# Use your unique ID to get your active API key
my_api_key = imove.get_api_key(my_id)["api_key"]

# Start using the API!
callback_url= "" # You can specify a call-back url - if not, results will be returned

headline_analysis = imove.analyze_headline(
    api_key=my_api_key,
    headline="ECB Hikes Rates by 50bps, Signals Further Increases",
    date="12/15/2022",
    callback_url=callback_url,
)

if not callback_url:
    print(headline_analysis)
```
How the headline analysis output would look
```python
# Headline analysis
{"text":"ECB Hikes Rates by 50bps, Signals Further IncreasesEuro Area Interest ...",
"datetime":"12/15/2022",
"sign":"bear",
"indicator":"rate hikes",
"description":"rate hikes increased",
"score":-0.6049461960792542}
```

```python
article = """The S&P/TSX Composite index extended early advances and closed 0.8% higher at 19,500 on Friday, notching a 0.3% increase on the week and outperforming its US counterparts with gains for energy producers and banks. In the meantime, investors digested domestic growth data, pointing to a stall in November and confirming that the Canadian economy expanded by 0.1% in October as growth in services-producing industries offset losses for goods-producing industries. Oil companies soared 4% to lead the gains in the session, tracking the second consecutive weekly increase for crude oil benchmarks. Toronto’s heavyweight banking and mining sectors also booked gains. On the other hand, concerns about tighter monetary policy continued to press the technology sector, leading losses for the day with a 3% slide for Shopify. The Toronto Exchange will be closed on Monday and Tuesday for holidays."""

article_analysis = imove.analyze_article(
    api_key=my_api_key,
    article=article,
    date="12/15/2022",
    callback_url=callback_url,
)

if not callback_url:
    print(article_analysis)
```
How the article analysis output would look
```python
{
    "chunks": [
        {
            "chunk": "pointing to a stall in November and confirming that the Canadian economy expanded by 0.1% in October as growth in services-producing industries offset losses for goods-producing industries.",
            "sign": "bull",
            "indicator": "gdp growth rate",
            "description": "gdp growth rate expanded",
            "score": 0.52849942445755,
        },
        {
            "chunk": "Oil companies soared 4% to lead the gains in the session",
            "sign": "bull",
            "indicator": "crude oil production",
            "description": "crude oil production climbed",
            "score": 0.5355966091156006,
        },
        {
            "chunk": "tracking the second consecutive weekly increase for crude oil benchmarks.",
            "sign": "bull",
            "indicator": "crude oil production",
            "description": "crude oil production climbed",
            "score": 0.6578888297080994,
        },
        {
            "chunk": "Toronto’s heavyweight banking and mining sectors also booked gains.",
            "sign": "bull",
            "indicator": "mining production",
            "description": "mining production booked gains",
            "score": 0.6116775274276733,
        },
    ],
    "average_score": 5.569899559020996,
    "average_sign": "bull",
    "datetime": "12/07/2022",
}
```
Other useful methods

```python
print(imove.status(my_api_key, product_name = "headlines-100")["status"]) # Prints whether the api key is active
print(imove.credits_consumed(my_api_key, product_name = "headlines-100")["credits_consumed"]) # Prints how many credits have been used
print(imove.credits_available(my_api_key, product_name = "headlines-100")["credits_available"]) # Prints how many credits are available

print(imove.status(my_api_key, product_name = "articles-100")["status"]) # Prints whether the api key is active
print(imove.credits_consumed(my_api_key, product_name = "articles-100")["credits_consumed"]) # Prints how many credits have been used
print(imove.credits_available(my_api_key, product_name = "articles-100")["credits_available"]) # Prints how many credits are available
```


            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/abdelatifsd/intramove",
    "name": "intramove",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.6",
    "maintainer_email": "",
    "keywords": "python,deep learning,finance,text classification,text analysis,sentiment",
    "author": "Abdellatif Dalab",
    "author_email": "abdulatifsal@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/7f/d4/0b1a365e03ff8baaa11e14031a7cca50e4dec33169c3d1c919c5bd267a20/intramove-0.0.15.tar.gz",
    "platform": null,
    "description": "\n# Intramove (Alpha Version)\n\nA client for interacting with Intramove.ai API\n\nDeveloped by Abdellatif Dalab 2022\n\n##  How to get access\n\nPurchasing Credits\n\n```python\nfrom intramove.intramove import Intramove\n\nimove = Intramove()\n\nprint(imove.get_available_packages()) # Displays all the available product packages \n# [\"headlines-100\",\"articles-100\"]\n\n# Opens a web browsers with a stripe payment link  - if it doesn't, you can simply run the link in a browser\n# An account with your checkout email and name will be automatically registered in intramove's database\nurl, session_details = imove.buy_package(product=\"headlines-100\", quantity=1) \nurl, session_details = imove.buy_package(product=\"articles-100\", quantity=1) \n\n```\n\nOnce purchase is done\n\n```python\nfrom intramove.intramove import Intramove\n\nimove = Intramove()\n\n# Using the same email and name from checkout, get your unique ID\nmy_id = imove.get_id(email=\"dan@gmail.com\", name=\"dan\")[\"client_id\"]\n\n# Use your unique ID to get your active API key\nmy_api_key = imove.get_api_key(my_id)[\"api_key\"]\n\n# Start using the API!\ncallback_url= \"\" # You can specify a call-back url - if not, results will be returned\n\nheadline_analysis = imove.analyze_headline(\n    api_key=my_api_key,\n    headline=\"ECB Hikes Rates by 50bps, Signals Further Increases\",\n    date=\"12/15/2022\",\n    callback_url=callback_url,\n)\n\nif not callback_url:\n    print(headline_analysis)\n```\nHow the headline analysis output would look\n```python\n# Headline analysis\n{\"text\":\"ECB Hikes Rates by 50bps, Signals Further IncreasesEuro Area Interest ...\",\n\"datetime\":\"12/15/2022\",\n\"sign\":\"bear\",\n\"indicator\":\"rate hikes\",\n\"description\":\"rate hikes increased\",\n\"score\":-0.6049461960792542}\n```\n\n```python\narticle = \"\"\"The S&P/TSX Composite index extended early advances and closed 0.8% higher at 19,500 on Friday, notching a 0.3% increase on the week and outperforming its US counterparts with gains for energy producers and banks. In the meantime, investors digested domestic growth data, pointing to a stall in November and confirming that the Canadian economy expanded by 0.1% in October as growth in services-producing industries offset losses for goods-producing industries. Oil companies soared 4% to lead the gains in the session, tracking the second consecutive weekly increase for crude oil benchmarks. Toronto\u2019s heavyweight banking and mining sectors also booked gains. On the other hand, concerns about tighter monetary policy continued to press the technology sector, leading losses for the day with a 3% slide for Shopify. The Toronto Exchange will be closed on Monday and Tuesday for holidays.\"\"\"\n\narticle_analysis = imove.analyze_article(\n    api_key=my_api_key,\n    article=article,\n    date=\"12/15/2022\",\n    callback_url=callback_url,\n)\n\nif not callback_url:\n    print(article_analysis)\n```\nHow the article analysis output would look\n```python\n{\n    \"chunks\": [\n        {\n            \"chunk\": \"pointing to a stall in November and confirming that the Canadian economy expanded by 0.1% in October as growth in services-producing industries offset losses for goods-producing industries.\",\n            \"sign\": \"bull\",\n            \"indicator\": \"gdp growth rate\",\n            \"description\": \"gdp growth rate expanded\",\n            \"score\": 0.52849942445755,\n        },\n        {\n            \"chunk\": \"Oil companies soared 4% to lead the gains in the session\",\n            \"sign\": \"bull\",\n            \"indicator\": \"crude oil production\",\n            \"description\": \"crude oil production climbed\",\n            \"score\": 0.5355966091156006,\n        },\n        {\n            \"chunk\": \"tracking the second consecutive weekly increase for crude oil benchmarks.\",\n            \"sign\": \"bull\",\n            \"indicator\": \"crude oil production\",\n            \"description\": \"crude oil production climbed\",\n            \"score\": 0.6578888297080994,\n        },\n        {\n            \"chunk\": \"Toronto\u2019s heavyweight banking and mining sectors also booked gains.\",\n            \"sign\": \"bull\",\n            \"indicator\": \"mining production\",\n            \"description\": \"mining production booked gains\",\n            \"score\": 0.6116775274276733,\n        },\n    ],\n    \"average_score\": 5.569899559020996,\n    \"average_sign\": \"bull\",\n    \"datetime\": \"12/07/2022\",\n}\n```\nOther useful methods\n\n```python\nprint(imove.status(my_api_key, product_name = \"headlines-100\")[\"status\"]) # Prints whether the api key is active\nprint(imove.credits_consumed(my_api_key, product_name = \"headlines-100\")[\"credits_consumed\"]) # Prints how many credits have been used\nprint(imove.credits_available(my_api_key, product_name = \"headlines-100\")[\"credits_available\"]) # Prints how many credits are available\n\nprint(imove.status(my_api_key, product_name = \"articles-100\")[\"status\"]) # Prints whether the api key is active\nprint(imove.credits_consumed(my_api_key, product_name = \"articles-100\")[\"credits_consumed\"]) # Prints how many credits have been used\nprint(imove.credits_available(my_api_key, product_name = \"articles-100\")[\"credits_available\"]) # Prints how many credits are available\n```\n\n",
    "bugtrack_url": null,
    "license": "",
    "summary": "A client for interacting with Intramove.ai API",
    "version": "0.0.15",
    "split_keywords": [
        "python",
        "deep learning",
        "finance",
        "text classification",
        "text analysis",
        "sentiment"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "md5": "1d2d34f05e3845769dfdcfcd1b8e81f5",
                "sha256": "0bbae2b243ea5493bab83e910179750fa3b77efb08029573819deca77c6984fa"
            },
            "downloads": -1,
            "filename": "intramove-0.0.15-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "1d2d34f05e3845769dfdcfcd1b8e81f5",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.6",
            "size": 6013,
            "upload_time": "2022-12-29T20:11:16",
            "upload_time_iso_8601": "2022-12-29T20:11:16.537720Z",
            "url": "https://files.pythonhosted.org/packages/f6/f5/7796a4f28702bcd1ae7573a9bdac538633c9519b6db234758bfac1f77125/intramove-0.0.15-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "md5": "bd1e08cda9fae924b057ed2bdbf78e5e",
                "sha256": "f8e4b9de2bb1776a9a9a9c380989893b392c16baa048786dfdad8b1ac848f5ab"
            },
            "downloads": -1,
            "filename": "intramove-0.0.15.tar.gz",
            "has_sig": false,
            "md5_digest": "bd1e08cda9fae924b057ed2bdbf78e5e",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.6",
            "size": 5742,
            "upload_time": "2022-12-29T20:11:18",
            "upload_time_iso_8601": "2022-12-29T20:11:18.164777Z",
            "url": "https://files.pythonhosted.org/packages/7f/d4/0b1a365e03ff8baaa11e14031a7cca50e4dec33169c3d1c919c5bd267a20/intramove-0.0.15.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2022-12-29 20:11:18",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "github_user": "abdelatifsd",
    "github_project": "intramove",
    "lcname": "intramove"
}
        
Elapsed time: 0.02754s