Beispiel #1
0
    def setUp(self) -> None:
        """Set up the `EdgarClient` Client."""

        # Initialize a new instance.
        self.edgar_client = EdgarClient()

        # This is Facebook.
        self.cik_number = '1265107'
Beispiel #2
0
class Edg(TestCase):
    """Will perform a unit test for the `EdgarClient` session."""
    def setUp(self) -> None:
        """Set up the `EdgarClient` Client."""

        # Initialize a new instance.
        self.edgar_client = EdgarClient()

        # This is Facebook.
        self.cik_number = '1265107'

    def test_creates_instance_of_client(self):
        """Create an instance and make sure it's a `EdgarClient`."""

        # Make sure it matches.
        self.assertIsInstance(self.edgar_client, EdgarClient)

    def test_creates_instance_of_session(self):
        """Create an instance and make sure it's a `EdgarSession`."""

        # Make sure it matches.
        self.assertIsInstance(self.edgar_client.edgar_session, EdgarSession)

    def test_creates_instance_of_series(self):
        """Create an instance and make sure it's a `Series`."""

        # Make sure it matches.
        self.assertIsInstance(self.edgar_client.series(), Series)

    def test_creates_instance_of_archives(self):
        """Create an instance and make sure it's a `Archives`."""

        # Make sure it matches.
        self.assertIsInstance(self.edgar_client.archives(), Archives)

    def test_creates_instance_of_companies(self):
        """Create an instance and make sure it's a `Companies`."""

        # Make sure it matches.
        self.assertIsInstance(self.edgar_client.companies(), Companies)

    def tearDown(self) -> None:
        """Teardown the `Edgar` Client."""

        del self.edgar_client
from pprint import pprint
from edgar.client import EdgarClient

# Initialize the Edgar Client
edgar_client = EdgarClient()

# Initialize the `VariableInsuranceProducts` Services.
insurance_prods_services = edgar_client.variable_insurance_products()

# Grab all the products that fall under a certain name.
insurance_prods_services.get_products_by_name(
    company_name='goldman sachs'
)
import pprint
from datetime import date
from edgar.client import EdgarClient
from edgar.enums import FilingTypeCodes

# Initalize the client.
edgar_client = EdgarClient()
from pprint import pprint
from edgar.client import EdgarClient

# Initialize the Edgar Client
edgar_client = EdgarClient()

# Initialize the `OwnershipFilings` Services.
filings_service = edgar_client.ownership_filings()

# Grab all the Ownership Filings that fall under a certain CIK number.
pprint(filings_service.get_ownership_filings_by_cik(cik='1326801'))

# Grab all the Ownership Filings that fall under a certain company name.
pprint(filings_service.get_ownership_filings_by_name(company_name='Facebook'))

# Grab all the Non-Ownership Filings that fall under a certain CIK number.
pprint(filings_service.get_non_ownership_filings_by_cik(cik='1326801'))

# Grab all the Non-Ownership Filings that fall under a certain company name.
pprint(
    filings_service.get_non_ownership_filings_by_name(company_name='Facebook'))

# Complex Query for Ownership Filings.
pprint(
    filings_service.query_ownership_filings(company_name='Facebook',
                                            after_date='2019-12-01'))

# Complex Query for Ownership Filings.
pprint(
    filings_service.query_non_ownership_filings(company_name='Facebook',
                                                after_date='2019-12-01'))
from pprint import pprint
from edgar.client import EdgarClient

# Initialize the Edgar Client
edgar_client = EdgarClient()

# Initialize the `Datasets` Services.
datasets_service = edgar_client.datasets()

# Grab all the SEC Datasets.
pprint(datasets_service.get_sec_datasets())

# Grab all the Edgar Taxonomies used in SEC filings..
pprint(datasets_service.get_edgar_taxonomies())
Beispiel #7
0
from pprint import pprint
from edgar.client import EdgarClient

# Initialize the Edgar Client
edgar_client = EdgarClient()

# Initialize the `MutualFunds` Services.
mutual_funds_services = edgar_client.mutual_funds()

# # Grab all the mutual fund filings for a specific CIK..
# pprint(
#     mutual_funds_services.get_mutual_fund_filings_by_type(
#         cik='C000005186',
#         mutual_fund_type='mutual-fund',
#         number_of_filings=300
#     )
# )

# # Grab all the mutual fund filings for a specific name..
# pprint(
#     mutual_funds_services.get_mutual_funds_by_name(
#         company_name='ADVANCED SERIES TRUST',
#     )
# )

# Grab all the series and Contracts.
pprint(mutual_funds_services.list_series_and_contracts_by_cik(cik='814679'))
Beispiel #8
0
from pprint import pprint
from edgar.client import EdgarClient

# Initialize the Edgar Client
edgar_client = EdgarClient()

# Initialize the Archives Services.
archive_services = edgar_client.archives()

# Grab the Company Directories for CIK `1326801` also known as Facebook.
pprint(archive_services.get_company_directories(cik='1326801')[:2])

# Grab a specific Company Directory for CIK `1326801` also known as Facebook.
pprint(
    archive_services.get_company_directory(cik='1326801',
                                           filing_id='000095010321003805'))

# Grab a specific Company Directory for CIK `1326801` also known as Facebook.
pprint(archive_services.get_feed(year=1996, quarter='qtr4'))

# Grab the old loads for the year 1996 of Qtr 4.
pprint(archive_services.get_old_loads(year=1996, quarter='qtr4'))

# Grab all the Virtual Private Reference Rooms.
pprint(archive_services.get_virtual_private_reference_rooms())

# Grab a specific Virtual Private Reference Room.
pprint(archive_services.get_virtual_private_reference_room(film_number='1403'))

# Grab all the Daily Indexes.
pprint(archive_services.get_daily_indexes())
Beispiel #9
0
from pprint import pprint
from edgar.client import EdgarClient

# Initialize the Edgar Client
edgar_client = EdgarClient()

# Initialize the `Series` Services.
series_services = edgar_client.series()

# Grab a series by the CIK number.
pprint(series_services.get_series_by_cik(cik='814679'))

# Grab all the series that belong to a particular series ID.
pprint(series_services.get_series_by_series_id(series_id='S000001976'))

# # Get the filings that belong to a particular Series ID.
# pprint(series_services.get_series_filings_by_series_id(series_id='S000001976'))
Beispiel #10
0
from pprint import pprint
from edgar.client import EdgarClient

# Initialize the Edgar Client
edgar_client = EdgarClient()

# Initialize the Current Events Services.
current_events_services = edgar_client.current_events()

# Grab all the companies that are based in Texas.
pprint(current_events_services.get_current_event_filings(days_prior=0, form='10-k-annual'))
from pprint import pprint
from edgar.client import EdgarClient
from edgar.enums import StateCodes
from edgar.enums import CountryCodes
from edgar.enums import StandardIndustrialClassificationCodes

# Initialize the Edgar Client
edgar_client = EdgarClient()

# Initialize the Company Services.
company_services = edgar_client.companies()

# Grab all the companies that are based in Texas.
pprint(company_services.get_companies_by_state(state_code='TX'))

# Alternatively, if you didn't know the 2 letter code you coude pass through an Enum.
pprint(
    company_services.get_companies_by_state(
        state_code=StateCodes.West_Virginia
    )
)

# Grab all the companies that are based in Australia, same logic here with the Enums.
pprint(
    company_services.get_companies_by_country(
        country_code=CountryCodes.AUSTRALIA
    )
)

# Grab all the companies that are Oil & Gas Services Companies, same logic here with the Enums.
pprint(
from pprint import pprint
from edgar.client import EdgarClient
from edgar.enums import StateCodes
from edgar.enums import CountryCodes
from edgar.enums import StandardIndustrialClassificationCodes

# Initialize the Edgar Client
edgar_client = EdgarClient()

# Initialize the Issuers Services.
issuers_service = edgar_client.issuers()

# Grab all the companies that are based in Texas.
pprint(issuers_service.get_issuers_by_cik(cik='0001084869'))
class Edg(TestCase):

    """Will perform a unit test for the `EdgarClient` session."""

    def setUp(self) -> None:
        """Set up the `EdgarClient` Client."""

        # Initialize a new instance.
        self.edgar_client = EdgarClient()

        # This is Facebook.
        self.cik_number = '1265107'

    def test_creates_instance_of_client(self):
        """Create an instance and make sure it's a `EdgarClient` object."""

        # Make sure it matches.
        self.assertIsInstance(self.edgar_client, EdgarClient)

    def test_creates_instance_of_session(self):
        """Create an instance and make sure it's a `EdgarSession` object."""

        # Make sure it matches.
        self.assertIsInstance(self.edgar_client.edgar_session, EdgarSession)

    def test_creates_instance_of_series(self):
        """Create an instance and make sure it's a `Series` object."""

        # Make sure it matches.
        self.assertIsInstance(self.edgar_client.series(), Series)

    def test_creates_instance_of_archives(self):
        """Create an instance and make sure it's a `Archives` object."""

        # Make sure it matches.
        self.assertIsInstance(self.edgar_client.archives(), Archives)

    def test_creates_instance_of_companies(self):
        """Create an instance and make sure it's a `Companies` object."""

        # Make sure it matches.
        self.assertIsInstance(self.edgar_client.companies(), Companies)

    def test_creates_instance_of_datasets(self):
        """Create an instance and make sure it's a `Datasets` object."""

        # Make sure it matches.
        self.assertIsInstance(self.edgar_client.datasets(), Datasets)

    def test_creates_instance_of_current_events(self):
        """Create an instance and make sure it's a `CurrentEvents` object."""

        # Make sure it matches.
        self.assertIsInstance(
            self.edgar_client.current_events(),
            CurrentEvents
        )

    def test_creates_instance_of_filings(self):
        """Create an instance and make sure it's a `Filing` object."""

        # Make sure it matches.
        self.assertIsInstance(self.edgar_client.filings(), Filings)

    def test_creates_instance_of_issuers(self):
        """Create an instance and make sure it's a `Issuers` object."""

        # Make sure it matches.
        self.assertIsInstance(self.edgar_client.issuers(), Issuers)

    def test_creates_instance_of_ownership_filings(self):
        """Create an instance and make sure it's a `OwnershipFilings` object."""

        # Make sure it matches.
        self.assertIsInstance(
            self.edgar_client.ownership_filings(), OwnershipFilings)

    def tearDown(self) -> None:
        """Teardown the `Edgar` Client."""

        del self.edgar_client