europe
Version, currently 0.1.1924 versions
- 0.1.23latestNov 3, 2022
- 0.1.22not indexedSep 29, 2025
- 0.1.21not indexedSep 29, 2025
- 0.1.20not indexedSep 29, 2025
- 0.1.19not indexedSep 29, 2025
- 0.1.18not indexedSep 29, 2025
- 0.1.17not indexedSep 29, 2025
- 0.1.16not indexedSep 29, 2025
- 0.1.15not indexedSep 29, 2025
- 0.1.14not indexedSep 29, 2025
- 0.1.13not indexedSep 29, 2025
- 0.1.12not indexedSep 29, 2025
- 0.1.11not indexedSep 29, 2025
- 0.1.10not indexedSep 29, 2025
- 0.1.9not indexedSep 29, 2025
- 0.1.8not indexedSep 29, 2025
- 0.1.7not indexedSep 29, 2025
- 0.1.6not indexedSep 29, 2025
- 0.1.5not indexedSep 29, 2025
- 0.1.4not indexedSep 29, 2025
- 0.1.3not indexedSep 29, 2025
- 0.1.2not indexedSep 29, 2025
- 0.1.0not indexedSep 29, 2025
- v.0.1.12not indexedSep 29, 2025
github.com/gem-shards/europe.cr
:eu: Europe is a Crystal library for retrieving EU related data such as VAT rates, VAT validation, currency exchange rates and country information.
Nothing has been indexed for 0.1.19 yet. The tag is recorded, its shard.yml has not been read, so the manifest and dependency list below are empty because they are unknown rather than because they are absent.
Installation
# Add this to your shard.yml
dependencies:
europe:
github: gem-shards/europe.cr
version: ~> 0.1.19Then run:
shards installshard.yml
No shard.yml has been indexed for 0.1.19. You can read it on the repository.
Dependencies
Unknown: the shard.yml for this version has not been read yet.
README
This README is the one indexed from the repository at its latest ref, not from the tag for this version.
Europe.cr :eu:
This shard provides EU governmental data, extracted from various EU / EC websites. With this shard you can validate VAT numbers, retrieve VAT tax rates and currency exchange rates matched to the Euro. How to use this library is pretty straightforward and written below.
Table of Contents
Installation
Add this to your application's shard.yml:
dependencies:
europe:
github: gem-shards/europe.cr
Usage
First require the library;
require "europe"
There are several calls you can make with this library. Below are a few examples where this library can be used for.
Validating VAT numbers
** Updated: Parameter now consists of one value.** Call to validate VAT number (always starts with country code as specified in VIES)
Europe::Vat.validate("NL009291477B01")
Response
{ valid: true,
country_code: "NL",
vat_number: "009291477B01",
request_date: "2018-06-16+02:00",
name: "KONINKLIJKE POSTNL B.V.",
address: nil }
Validate VAT number format
Call
Europe::Vat::Format.validate("NL123456789B01")
Response
=> true
Retrieving VAT rates for each EC/EU member
Call
Europe::Vat::Rates.retrieve
Response
{ "AT" => 20.0,
"BE" => 21.0,
"BG" => 20.0,
"CY" => 19.0,
"CZ" => 21.0,
"DE" => 19.0,
"DK" => 25.0,
# etc...
Retrieving currency exchange rates
Call
Europe::Currency::ExchangeRates.retrieve
Response
{ :date => 2018-06-15 00:00:00.0 UTC,
:rates =>
{ "USD" => 1.099,
"JPY" => 132.97,
"BGN" => 1.9558,
"CZK" => 27.022,
"DKK" => 7.4614,
"GBP" => 0.7252,
# etc...
Retrieving currency information
Call
Europe::Currency::CURRENCIES
Response
CURRENCIES = {
EUR: { name: "Euro", symbol: "€", html: "€" },
BGN: { name: "Lev", symbol: "лв", html: "лв" },
# etc...
Retrieving country information
Call
Europe::Countries::COUNTRIES
Response
{
BE:
{name: "Belgium",
source_name: "Belgique/België",
official_name: "Kingdom of Belgium",
tld: ".be",
currency: "EUR",
capital: "Brussels"},
BG:
{name: "Bulgaria",
source_name: "България",
official_name: "Republic of Bulgaria",
tld: ".bg",
currency: "BGN",
capital: "Sofia"},
# etc...
Retrieving country information reversed
Call with optional parameters (name, currency, source_name, official_name, tld, currency and capital)
Europe::Countries::Reversed.generate(:name)
Response
{ "Belgium" => :BE,
"Bulgaria" => :BG,
"Czech Republic" => :CZ,
"Denmark" => :DK,
"Germany" => :DE,
"Estonia" => :EE,
# etc...
Compatibility
This library is tested with the following Crystal versions on Linux and Mac OS X:
- 1.6.1
- 1.5.1
- 1.5.0
- 1.4.1
- 1.2.0
- 1.0.0
Todo
- Generate docs
- Cleanup the code
- Eurostat integration (http://ec.europa.eu/eurostat/)
- ..
Contributing
- Fork it ( https://github.com/gem-shards/europe.cr/fork )
- Create your feature branch (git checkout -b my-new-feature)
- Commit your changes (git commit -am 'Add some feature')
- Push to the branch (git push origin my-new-feature)
- Create a new Pull Request
Contributors
- gem-shards gem-shards - creator, maintainer
Documentation
Built from the current release. The first visit to a release nobody has asked for starts its build.
Links
This release
- Version
0.1.19- Tagged
- Sep 29, 2025
- Commit
cc855f9a78b5- Indexed
- not yet
Dependents
No indexed shard depends on this one yet.
Repository
github.com/gem-shards/europe.cr
Metadata
- Created
- Aug 12, 2026
- Updated
- Aug 12, 2026
- Synced
- Aug 12, 2026
- Versions
- 24