CountriesInfo 1.0.1
There is a newer version of this package available.
See the version list below for details.
See the version list below for details.
dotnet add package CountriesInfo --version 1.0.1
NuGet\Install-Package CountriesInfo -Version 1.0.1
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="CountriesInfo" Version="1.0.1" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add CountriesInfo --version 1.0.1
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: CountriesInfo, 1.0.1"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install CountriesInfo as a Cake Addin #addin nuget:?package=CountriesInfo&version=1.0.1 // Install CountriesInfo as a Cake Tool #tool nuget:?package=CountriesInfo&version=1.0.1
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
Countries Info
A comprehensive multi-language library for accessing detailed country information. Available for multiple platforms and languages.
Available Packages
1. JavaScript/Node.js
npm install @mohaned.ghawar/countries-info
2. Python
pip install countries-info-mg
3. PHP
composer require mohanedghawar/countries-info
4. .NET
dotnet add package CountriesInfo
Features
- Comprehensive country information
- Administrative regions for all countries
- Multiple language/platform support
- Easy to use API
- Consistent data structure across all platforms
- Regular updates
Data Structure
Each country object contains:
- Name: Country name
- Code: ISO 3-letter code
- Capital: Capital city
- Continent: Continent name
- Population: Population count
- Area: Area in square kilometers
- Regions: Administrative regions/divisions (states, provinces, etc.)
Usage Examples
JavaScript
const { getAllCountries, getCountryByName, getCountryByCode, getCountryRegions } = require('@mohaned.ghawar/countries-info');
// Get all countries
const countries = getAllCountries();
// Get country by name
const france = getCountryByName('France');
// Get country by code
const usa = getCountryByCode('USA');
// Get country regions
const usaRegions = getCountryRegions('USA'); // Returns all US states
Python
from countries_info import get_all_countries, get_country_by_name, get_country_by_code, get_country_regions
# Get all countries
countries = get_all_countries()
# Get country by name
france = get_country_by_name('France')
# Get country by code
usa = get_country_by_code('USA')
# Get country regions
usa_regions = get_country_regions('USA') # Returns all US states
PHP
use MohanedGhawar\CountriesInfo\CountriesInfo;
$countriesInfo = new CountriesInfo();
// Get all countries
$countries = $countriesInfo->getAllCountries();
// Get country by name
$france = $countriesInfo->getCountryByName('France');
// Get country by code
$usa = $countriesInfo->getCountryByCode('USA');
// Get country regions
$usaRegions = $countriesInfo->getCountryRegions('USA'); // Returns all US states
C# (.NET)
using CountriesInfo;
var service = new CountriesService();
// Get all countries
var countries = service.GetAllCountries();
// Get country by code
var usa = service.GetCountryByCode("USA");
// Get countries by continent
var europeanCountries = service.GetCountriesByContinent("Europe");
// Get country regions
var usaRegions = service.GetCountryRegions("USA"); // Returns all US states
Documentation
Detailed documentation for each platform:
License
MIT License - see the LICENSE file for details.
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
Support
If you encounter any issues or have questions, please file an issue on the appropriate GitHub repository:
- JavaScript: countries-info-js issues
- Python: countries-info-py issues
- PHP: countries-info-php issues
- .NET: countries-info issues
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net7.0 is compatible. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
net7.0
- Newtonsoft.Json (>= 13.0.3)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.