wikirate4py


Namewikirate4py JSON
Version 1.2.8 PyPI version JSON
download
home_pagehttps://github.com/wikirate/wikirate4py
SummaryWikirate for Python!
upload_time2024-09-20 17:17:54
maintainerNone
docs_urlNone
authorVasiliki Gkatziaki
requires_python>=3.6
licenseGPL-3.0
keywords wikirate library
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Wikirate4py: Wikirate for Python!

[![PyPI](https://img.shields.io/pypi/v/wikirate4py?label=PyPI)](https://pypi.org/project/wikirate4py/) 
[![Python](https://img.shields.io/pypi/pyversions/wikirate4py?label=Python)](https://pypi.org/project/wikirate4py/) 
[![ReadTheDocs](https://readthedocs.org/projects/wikirate4py/badge/?version=latest)](https://wikirate4py.readthedocs.io/en/latest/)

- Official [Wikirate](https://wikirate.org)'s wrapper for Python
- Full Documentation: https://wikirate4py.readthedocs.io/
- [Official Slack Channel](https://wikirate.slack.com/archives/C021YJBQT8E)

## Installation

The easiest way to install the latest version from PyPI is by using pip:

```bash
$ pip install wikirate4py
```

You can also use Git to clone the repository from GitHub to install the latest development version:

```bash
$ git clone https://github.com/wikirate/wikirate4py.git
$ cd wikirate4py
$ pip install .
```

Alternatively, install directly from the GitHub repository:

```bash
$ pip install git+https://github.com/wikirate/wikirate4py.git
```

Python 3.6 - 3.9 are supported.

## Usage

`wikirate4py` makes it easy to interact with Wikirate's API:

```python
from wikirate4py import API
api = API('your_api_token')
company = api.get_company(7217) # returns company given company's numeric identifier
print(company.name)  # 'Adidas AG'
print(company.headquarters)  # 'Germany'
```

## DataFrames

From version 1.2.0, the `wikirate4py` library allows users to transform `WikirateEntity` objects to DataFrames. Here is a usage example:

```python
from wikirate4py import API
from wikirate4py.utils import to_dataframe

api = API('your_api_token')
cursor = wikirate4py.Cursor(api.get_metric_answers,
                            metric_name="Revenue EUR",
                            metric_designer="Clean Clothes Campaign",
                            year=2020)
answers = []
while cursor.has_next():
    answers += cursor.next()

print(to_dataframe(answers).to_string())
```

## Company Identifiers

From version 1.2.8, the `wikirate4py` library allows users to search companies by identifier. For example, if you know their Legal Entity Identifier (LEI) or one of their ISINs, you can search using the companies endpoint as shown below:

```python
from wikirate4py import API
api = API('your_api_token')
companies = api.get_companies(company_identifier=["213800EJP14A79ZG1X44", "VGG1890L1076"]) # get companies that match any of the two given company identifiers
print(companies)
```

Example output:

```json
[
    {
        "australian_business_number": null,
        "headquarters": "United Kingdom",
        "id": 9269,
        "isin": ["GB0031274896"],
        "lei": "213800EJP14A79ZG1X44",
        "name": "Marks and Spencer Group plc",
        "open_corporates": "00214436",
        "os_id": null,
        "sec_cik": null,
        "uk_company_number": null
    },
    {
        "australian_business_number": null,
        "headquarters": "United Kingdom",
        "id": 3152073,
        "isin": ["VGG1890L1076"],
        "lei": "549300LPG8W0H1OX3A26",
        "name": "Capri Holdings Ltd (formerly Michael Kors)",
        "open_corporates": "11308598",
        "os_id": null,
        "sec_cik": "1530721",
        "uk_company_number": null
    }
]
```

## Contributing

Bug reports and feature suggestions are welcome on GitHub at https://github.com/wikirate/wikirate4py/issues.

## License

The library is available as Open Source under the terms of the [GNU General Public License v3 (GPLv3)](https://www.gnu.org/licenses/gpl-3.0.txt).

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/wikirate/wikirate4py",
    "name": "wikirate4py",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.6",
    "maintainer_email": null,
    "keywords": "wikirate library",
    "author": "Vasiliki Gkatziaki",
    "author_email": "vasso@wikirate.org",
    "download_url": "https://files.pythonhosted.org/packages/d0/1c/7ea7849f80c3d889cc717f18397d09659d1b9e23a7c8dbf5c8750cdfc7f1/wikirate4py-1.2.8.tar.gz",
    "platform": null,
    "description": "# Wikirate4py: Wikirate for Python!\r\n\r\n[![PyPI](https://img.shields.io/pypi/v/wikirate4py?label=PyPI)](https://pypi.org/project/wikirate4py/) \r\n[![Python](https://img.shields.io/pypi/pyversions/wikirate4py?label=Python)](https://pypi.org/project/wikirate4py/) \r\n[![ReadTheDocs](https://readthedocs.org/projects/wikirate4py/badge/?version=latest)](https://wikirate4py.readthedocs.io/en/latest/)\r\n\r\n- Official [Wikirate](https://wikirate.org)'s wrapper for Python\r\n- Full Documentation: https://wikirate4py.readthedocs.io/\r\n- [Official Slack Channel](https://wikirate.slack.com/archives/C021YJBQT8E)\r\n\r\n## Installation\r\n\r\nThe easiest way to install the latest version from PyPI is by using pip:\r\n\r\n```bash\r\n$ pip install wikirate4py\r\n```\r\n\r\nYou can also use Git to clone the repository from GitHub to install the latest development version:\r\n\r\n```bash\r\n$ git clone https://github.com/wikirate/wikirate4py.git\r\n$ cd wikirate4py\r\n$ pip install .\r\n```\r\n\r\nAlternatively, install directly from the GitHub repository:\r\n\r\n```bash\r\n$ pip install git+https://github.com/wikirate/wikirate4py.git\r\n```\r\n\r\nPython 3.6 - 3.9 are supported.\r\n\r\n## Usage\r\n\r\n`wikirate4py` makes it easy to interact with Wikirate's API:\r\n\r\n```python\r\nfrom wikirate4py import API\r\napi = API('your_api_token')\r\ncompany = api.get_company(7217) # returns company given company's numeric identifier\r\nprint(company.name)  # 'Adidas AG'\r\nprint(company.headquarters)  # 'Germany'\r\n```\r\n\r\n## DataFrames\r\n\r\nFrom version 1.2.0, the `wikirate4py` library allows users to transform `WikirateEntity` objects to DataFrames. Here is a usage example:\r\n\r\n```python\r\nfrom wikirate4py import API\r\nfrom wikirate4py.utils import to_dataframe\r\n\r\napi = API('your_api_token')\r\ncursor = wikirate4py.Cursor(api.get_metric_answers,\r\n                            metric_name=\"Revenue EUR\",\r\n                            metric_designer=\"Clean Clothes Campaign\",\r\n                            year=2020)\r\nanswers = []\r\nwhile cursor.has_next():\r\n    answers += cursor.next()\r\n\r\nprint(to_dataframe(answers).to_string())\r\n```\r\n\r\n## Company Identifiers\r\n\r\nFrom version 1.2.8, the `wikirate4py` library allows users to search companies by identifier. For example, if you know their Legal Entity Identifier (LEI) or one of their ISINs, you can search using the companies endpoint as shown below:\r\n\r\n```python\r\nfrom wikirate4py import API\r\napi = API('your_api_token')\r\ncompanies = api.get_companies(company_identifier=[\"213800EJP14A79ZG1X44\", \"VGG1890L1076\"]) # get companies that match any of the two given company identifiers\r\nprint(companies)\r\n```\r\n\r\nExample output:\r\n\r\n```json\r\n[\r\n    {\r\n        \"australian_business_number\": null,\r\n        \"headquarters\": \"United Kingdom\",\r\n        \"id\": 9269,\r\n        \"isin\": [\"GB0031274896\"],\r\n        \"lei\": \"213800EJP14A79ZG1X44\",\r\n        \"name\": \"Marks and Spencer Group plc\",\r\n        \"open_corporates\": \"00214436\",\r\n        \"os_id\": null,\r\n        \"sec_cik\": null,\r\n        \"uk_company_number\": null\r\n    },\r\n    {\r\n        \"australian_business_number\": null,\r\n        \"headquarters\": \"United Kingdom\",\r\n        \"id\": 3152073,\r\n        \"isin\": [\"VGG1890L1076\"],\r\n        \"lei\": \"549300LPG8W0H1OX3A26\",\r\n        \"name\": \"Capri Holdings Ltd (formerly Michael Kors)\",\r\n        \"open_corporates\": \"11308598\",\r\n        \"os_id\": null,\r\n        \"sec_cik\": \"1530721\",\r\n        \"uk_company_number\": null\r\n    }\r\n]\r\n```\r\n\r\n## Contributing\r\n\r\nBug reports and feature suggestions are welcome on GitHub at https://github.com/wikirate/wikirate4py/issues.\r\n\r\n## License\r\n\r\nThe library is available as Open Source under the terms of the [GNU General Public License v3 (GPLv3)](https://www.gnu.org/licenses/gpl-3.0.txt).\r\n",
    "bugtrack_url": null,
    "license": "GPL-3.0",
    "summary": "Wikirate for Python!",
    "version": "1.2.8",
    "project_urls": {
        "Documentation": "https://wikirate4py.readthedocs.io",
        "Download": "https://github.com/wikirate/wikirate4py/archive/refs/tags/v1.2.8.tar.gz",
        "Homepage": "https://github.com/wikirate/wikirate4py",
        "Issue Tracker": "https://github.com/wikirate4py/wikirate4py/issues",
        "Source Code": "https://github.com/wikirate4py/wikirate4py"
    },
    "split_keywords": [
        "wikirate",
        "library"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "d01c7ea7849f80c3d889cc717f18397d09659d1b9e23a7c8dbf5c8750cdfc7f1",
                "md5": "b204cec1a63ef9aed34a199368d9a8c3",
                "sha256": "d2ffe3d0ac52e31ac3121dc9408f2abcf20b1b7be983aabaa339bf79f3a03cb0"
            },
            "downloads": -1,
            "filename": "wikirate4py-1.2.8.tar.gz",
            "has_sig": false,
            "md5_digest": "b204cec1a63ef9aed34a199368d9a8c3",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.6",
            "size": 31965,
            "upload_time": "2024-09-20T17:17:54",
            "upload_time_iso_8601": "2024-09-20T17:17:54.907128Z",
            "url": "https://files.pythonhosted.org/packages/d0/1c/7ea7849f80c3d889cc717f18397d09659d1b9e23a7c8dbf5c8750cdfc7f1/wikirate4py-1.2.8.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-09-20 17:17:54",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "wikirate",
    "github_project": "wikirate4py",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "requirements": [],
    "lcname": "wikirate4py"
}
        
Elapsed time: 0.34988s