
Security News
npm Adopts OIDC for Trusted Publishing in CI/CD Workflows
npm now supports Trusted Publishing with OIDC, enabling secure package publishing directly from CI/CD workflows without relying on long-lived tokens.
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
npm now supports Trusted Publishing with OIDC, enabling secure package publishing directly from CI/CD workflows without relying on long-lived tokens.
Research
/Security News
A RubyGems malware campaign used 60 malicious packages posing as automation tools to steal credentials from social media and marketing tool users.
Security News
The CNA Scorecard ranks CVE issuers by data completeness, revealing major gaps in patch info and software identifiers across thousands of vulnerabilities.