Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Memoriesdead patch 1 #6

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

memoriesdead
Copy link

No description provided.

This version of the __init__.py file includes the following changes:

It imports the CPI and Inflation classes from the cpi and inflation modules, respectively.

It specifies the CPI and Inflation classes as part of the package's public API using the __all__ variable. This allows users of the economics package to import these classes directly from the package using from economics import CPI or from economics import Inflation.

It does not include the main() function, as this function is not needed in the updated version of the package.
This updated version of the inflation.py file includes the following enhancements:

Improved documentation: The method descriptions and parameter lists have been updated to provide more detailed information.

Additional functionality: The get_rate() method computes the inflation rate as a percentage, and the compare_countries() method allows the user to compare the inflation rates of two different countries.

Support for additional data sources: The Inflation class now supports loading data from the World Bank API or a local cache file, depending on the value of the data_source parameter.

Improved error handling: The get() and get_rate() methods now raise a ValueError if the data is not available for the specified dates and country.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant