
Security News
CISA Rebuffs Funding Concerns as CVE Foundation Draws Criticism
CISA denies CVE funding issues amid backlash over a new CVE foundation formed by board members, raising concerns about transparency and program governance.
python-restcountries
Advanced tools
This is a simple python wrapper for the API of http://restcountries.com. If there are any issues, please use this repository to contact me about it.
pip install python-restcountries
Just import the API Wrapper and start using it!::
# v1 from restcountries import RestCountryApi as rapi
from restcountries import RestCountryApiV2 as rapi
def foo(name):
country_list = rapi.get_countries_by_name('France')
Pass filters as a keyword argument to any of RestCountryApiV2 or RestCountryApi methods, this filters the response returned by the api. Thus the Country Object will only contain the attributes in the filters list.
# v1 from restcountries import RestCountryApi as rapi
from restcountries import RestCountryApiV2 as rapi
def foo(name):
country_list = rapi.get_countries_by_name("France" ,filters=["name","currencies","capital"])
The API returns Country objects or a list of Country objects. Through the country objects one is able to access following attributes.
country = country_list[0]
print(country.name)
France
FAQs
Python API Wrapper for restcountries.com
We found that python-restcountries demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
CISA denies CVE funding issues amid backlash over a new CVE foundation formed by board members, raising concerns about transparency and program governance.
Product
We’re excited to announce a powerful new capability in Socket: historical data and enhanced analytics.
Product
Module Reachability filters out unreachable CVEs so you can focus on vulnerabilities that actually matter to your application.