Cointainer component for scraping coins from the ECB Website.
Introduction
Cointainer Scraper (ECB) is one of the components of the Cointainer. This component offers the functionality of scraping euro coin data from the ECB website.
Currently supported coins:
- €2 commemorative coins
- Country
- Feature
- Description
- Issuing Volume
- Issuing Date
- Image URLs
Installation
pip install cointainer-scraper-ecb
Example
from cointainer_scraper_ecb import get_two_euro_commemorative_coins
get_two_euro_commemorative_coins(
language="en",
year=2004
)
Tested with Python 3.9.13 and cointainer_scraper_ecb v0.1.3 ✔️
Two data classes are relevant which are beeing returned by the function:
def get_two_euro_commemorative_coins(
lang: str = "en",
year: int = START_YEAR
) -> List[TwoEuro]: ...
@dataclass
class Coinage:
"""Represents a coin of a country to be collected."""
country: Optional[str]
image_default_url: Optional[str]
volume: Optional[int]
image_default_url_info: Optional[str] = None
country_info: Optional[str] = None
circulation_date: Optional[datetime.date] = None
image_attribution: Optional[str] = None
circulation_date_info: Optional[str] = None
volume_info: Optional[str] = None
@dataclass
class TwoEuro:
"""A two euro coin to collect."""
feature: str = ""
description: str = ""
coinages: List[Coinage] = field(default_factory=list)
Roadmap
- Implement national side scraping (2€, 1€, 50 cent, 20 cent, 10 cent, 5 cent, 2 cent and 1 cent)
- CLI implementation with click
Development
Creating a new release
-
Run the following command
poetry version <version>
cointainer-scraper-ecb uses the following schema:^\d+\.\d+\.\d+((b|a)\d+)?$ -
Bump the version within the files:
Make sure it's the same version used when bumping with poetry
-
Open
CHANGELOG.mdand write the new changelog:- Use the following
#header:v<version> - (yyyy-mm-dd)
Used##headers: - 💌 Added
- 🔨 Fixed
- ♻️ Changed
- Use the following
-
Stage the modified files and push them with the following commit message:
chore: bump to version
v<version> -
Create annotated release tag
- New tag
git tag -s -m "release v<version>" v<version>- Push created tag
git push --tags -
Run the following command
poetry buildto create a tarball and a wheel based on the new version -
Create a new github release and:
- Copy and paste the changelog content without the
#header into the description of the release textbox - Use the
#header style to fill in the Release title (copy it from theCHANGELOG.md) - Copy the version with the
v-prefix into the Tag version
- Copy and paste the changelog content without the
-
Attach the produced tarball and wheel (
dist/) to the release -
Check This is a pre-release if it's either an alpha or beta release (a|b) - optional
-
Publish release
Testing
Use the following command to execute the tests:
poetry run pytest
To run the tests, the: download-test-files.(ps1|sh) script must be executed.
This is not the best method because the test data can change. However, I don't know if it is allowed to upload the data to the repository because of the copyright.
License
This cointainer-scraper-ecb module is distributed under Apache-2.0. For ODbL-1.0 exception, see LICENSING.md
Metadata
Release files for cointainer-scraper-ecb 0.1.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| cointainer-scraper-ecb-0.1.3.tar.gz | 54.3 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| cointainer_scraper_ecb-0.1.3-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 109.0 kB
Release files / cointainer-scraper-ecb-0.1.3.tar.gz
| Download URL | cointainer-scraper-ecb-0.1.3.tar.gz |
|---|---|
| Size | 54.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
45f0961cbe96096293c9aaba48cb1d97b417470782d1329a66fba5c97d595920
|
|
BLAKE2b-256 checksum How to use checksums |
7e12a58aea83da8bd2b231c8bbe40c71a851e15d447a259b781031097522546d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.2.0 CPython/3.10.4 Windows/10
|
Release files / cointainer_scraper_ecb-0.1.3-py3-none-any.whl
| Download URL | cointainer_scraper_ecb-0.1.3-py3-none-any.whl |
|---|---|
| Size | 54.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
76739829b892a6680b4077da7399b3a9f0bf7e47415b4ed7fa46a52dab32dc49
|
|
BLAKE2b-256 checksum How to use checksums |
8ecae5900320a4667be5ea2c6e5b46ae36b8e2c22c4050989c5037372b198b86
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.2.0 CPython/3.10.4 Windows/10
|
Security for cointainer-scraper-ecb 0.1.3
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.