How to use the investpy.get_bond_information function in investpy

To help you get started, we’ve selected a few investpy examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github alvarob96 / investpy / tests / test_investpy.py View on Github external
{
            'bond': 'spain 30y',
            'as_json': False
        },
        {
            'bond': 'argentina 3y',
            'as_json': True
        },
        {
            'bond': 'germany 3m',
            'as_json': False
        },
    ]

    for param in params:
        investpy.get_bond_information(bond=param['bond'], as_json=param['as_json'])
    
    params = [
        {
            'country': 'united states',
            'as_json': True,
        },
        {
            'country': 'united kingdom',
            'as_json': False,
        }
    ]

    for param in params:
        investpy.get_bonds_overview(country=param['country'], as_json=param['as_json'])

    investpy.search_bonds(by='name', value='Spain')
github alvarob96 / investpy / tests / test_investpy_errors.py View on Github external
'bond': ['error'],
            'as_json': False
        },
        {
            'bond': 'argentina 3y',
            'as_json': None
        },
        {
            'bond': 'error',
            'as_json': False
        },
    ]

    for param in params:
        try:
            investpy.get_bond_information(bond=param['bond'], as_json=param['as_json'])
        except:
            pass
    
    params = [
        {
            'country': None,
            'as_json': False,
        },
        {
            'country': ['error'],
            'as_json': False,
        },
        {
            'country': 'spain',
            'as_json': None,
        },