Skip to main content

Dow Jones Factiva Core Python Library

https://github.com/dowjones/factiva-core-python/actions/workflows/master_test_publish.yml/badge.svg https://readthedocs.org/projects/factiva-core-python/badge/?version=latest:target:https://factiva-core-python.readthedocs.io/en/latest/?badge=latest:alt:DocumentationStatus

Python package with root definitions and dictionaries, to support other functional packages. Get more details in the official documentation

  • UserKey: Represents an API user defined as a user key only (no O-Auth). This class is used in the Snapshots & Streams services

  • Dicts: Module that contains mulitple dictionaries for data combination or better human-reading.

Installation

To install this library, run the following commands. However, this library will be installed as a dependency of other Factiva or Dow Jones packages.

$ pip install --upgrade factiva-core

Using Library services

Quick examples that show how to use the included services.

Creating a User Instance and Getting its statistics

Create UserKey instance and retrieve a summary of the account statistics.

from factiva.core import UserKey
u = UserKey(key='abcd1234abcd1234abcd1234abcd1234', stats=True)
print(u)
<class 'factiva.core.userkey.UserKey'>
|-key = ****************************1234
|-cloud_token = **Not Fetched**
|-account_name = AccName1234
|-account_type = account_with_contract_limits
|-active_products = DNA
|-max_allowed_concurrent_extractions = 5
|-max_allowed_extracted_documents = 200,000
|-max_allowed_extractions = 3
|-currently_running_extractions = 0
|-total_downloaded_bytes = 7,253,890
|-total_extracted_documents = 2,515
|-total_extractions = 1
|-total_stream_instances = 4
|-total_stream_subscriptions = 1
|-enabled_company_identifiers = [{'id': 4, 'name': 'isin'}, {'id': 3, 'name': 'cusip'}, {'id': 1, 'name': 'sedol'}, {'id': 5, 'name': 'ticker_exchange'}]
|-remaining_documents = 197,485
|-remaining_extractions = 2

Loading Factiva Industry Hierarchy

Loads the Industry hierarchy dataset which, among others, contain the Industry Factiva Code.

from factiva.core import dicts
ih = dicts.industries_hierarchy()
ih.head()
ind_fcode            name   parent
0   indroot  *DJ Industries
1        i0     Agriculture  indroot
2    i01001         Farming       i0
3    i03001     Aquaculture   i01001
4  i0100144   Cocoa Growing   i01001

Using Proxy on requests

To enable the proxy options on each request call, you need to set this environment variables

$ export HTTP_PROXY="http://10.10.1.10:3128"
$ export HTTPS_PROXY="http://10.10.1.10:1080"

To use HTTP basic auth with your proxy, use the http://user:password@host/ syntax in any of the above configuration entries

$ export HTTPS_PROXY="http://user:pass@10.10.1.10:1080"

Metadata

Release files for factiva-core 0.2.5

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

Source distribution (sdist)

Source distribution for factiva-core 0.2.5
File Size Uploaded Provenance
factiva-core-0.2.5.tar.gz 50.3 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for factiva-core 0.2.5
File Interpreter ABI Platform
factiva_core-0.2.5-py3-none-any.whl Python 3 none any Details

Total release size: 104.9 kB

Release files / factiva-core-0.2.5.tar.gz

Download URL factiva-core-0.2.5.tar.gz
Size 50.3 kB
Tags Source
SHA-256 checksum
How to use checksums
94fef62a15f410b1752a11453e1c696086a9284fa025e67f7ed721fd9083c5bb
BLAKE2b-256 checksum
How to use checksums
091652e52d3904563ff045c389dd3f57878b58aaf3f23c7f2211ddb834f5bd11
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.9.13

Release files / factiva_core-0.2.5-py3-none-any.whl

Download URL factiva_core-0.2.5-py3-none-any.whl
Size 54.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
d1831a91ee72e6d2ac1fd91113624c233e2f07506db3aaf14aacc624e69924b9
BLAKE2b-256 checksum
How to use checksums
46bbf443e44cf33dded9034f7372b90f5df7162d846cc39e729c9b9b0a90782f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.9.13

Security for factiva-core 0.2.5

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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