Skip to main content

Wikirate4py: Wikirate for Python!

PyPI Python ReadTheDocs

Installation

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

$ pip install wikirate4py

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

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

Alternatively, install directly from the GitHub repository:

$ 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:

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:

from wikirate4py import API
from wikirate4py.utils import to_dataframe

api = API('your_api_token')
cursor = wikirate4py.Cursor(api.get_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:

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:

[
    {
        "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).

🎉 Acknowledgements

This project was supported by NLnet foundation.

Image

Release files for wikirate4py 2.0.8

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

Source distribution (sdist)

Source distribution for wikirate4py 2.0.8
File Size Uploaded
wikirate4py-2.0.8.tar.gz 36.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for wikirate4py 2.0.8
File Interpreter ABI Platform
wikirate4py-2.0.8-py3-none-any.whl Python 3 none any Details

Total release size:70.4 kB

Release files / wikirate4py-2.0.8.tar.gz

Download URL wikirate4py-2.0.8.tar.gz
Size 36.5 kB
Tags Source
SHA-256 checksum
How to use checksums
cef12729a30d13e426c4e7c9640965c3a96a07182bc1d805a28824e33e12ea3b
BLAKE2b-256 checksum
How to use checksums
189072ee0d761982a5b62138ac0bc76161c2bc64dee9e16f58d5db7499fb3e7e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.0

Release files / wikirate4py-2.0.8-py3-none-any.whl

Download URL wikirate4py-2.0.8-py3-none-any.whl
Size 34.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
4a8b248ec15a28232dca3e7931d3ca95ee41c274c69f489167400b94b8f91dc7
BLAKE2b-256 checksum
How to use checksums
54791164940de7778cd06ff82f33db2676cd0c2493f90f1ec75c5bb5eb4098f9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.0

Release history Release notifications | RSS feed

This release

2.0.8 This release

2 release files

2.0.7

2 release files

2.0.6

1 release file

2.0.5

1 release file

2.0.4

2 release files

2.0.3

2 release files

2.0.2

1 release file

2.0.1

1 release file

1.2.8

1 release file

1.2.5

1 release file

1.2.4

1 release file

1.2.3

1 release file

1.2.2

1 release file

1.2.1

1 release file

1.2.0

1 release file

1.1.9

1 release file

1.1.8

1 release file

1.1.6

1 release file

1.1.5

1 release file

1.1.4

1 release file

1.1.3

1 release file

1.1.2

1 release file

1.1.1

1 release file

1.1.0

1 release file

1.0.9

1 release file

1.0.8

1 release file

1.0.7

1 release file

1.0.6

1 release file

1.0.5

1 release file

1.0.4

1 release file

1.0.3

1 release file

1.0.2

1 release file

1.0.1

1 release file

1.0.0

1 release file

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