Security News
Research
Data Theft Repackaged: A Case Study in Malicious Wrapper Packages on npm
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
Python package with Czech public holidays <https://en.wikipedia.org/wiki/Public_holidays_in_the_Czech_Republic>
_.
From PyPI::
pip install czech-holidays
In case you have an adventurous mind, give a try to the source::
pip install git+https://github.com/honzajavorek/czech-holidays.git#egg=czech-holidays
Czech Holidays provides the following interface:
.. code:: python
>>> from czech_holidays import czech_holidays
>>> holidays = czech_holidays(2022)
>>> holidays[:3]
[Holiday(date=datetime.date(2022, 1, 1), name='Nový rok', name_en="New Year's Day"),
Holiday(date=datetime.date(2022, 1, 1), name='Den obnovy samostatného českého státu', name_en='Restoration Day of the Independent Czech State'),
Holiday(date=datetime.date(2022, 4, 18), name='Velikonoční pondělí', name_en='Easter Monday')]
The function accepts year as a single argument and returns a list of named tuples <https://docs.python.org/3/library/collections.html#collections.namedtuple>
_:
.. code:: python
>>> holidays[0].date
datetime.date(2022, 1, 1)
>>> holidays[0].name
'Nový rok'
>>> holidays[0].name_en
"New Year's Day"
Albeit named, it's still just a tuple:
.. code:: python
>>> holidays[0][0]
datetime.date(2022, 1, 1)
>>> holidays[0][1]
'Nový rok'
>>> holidays[0][2]
"New Year's Day"
>>> tuple(holidays[0])
(datetime.date(2022, 1, 1), 'Nový rok', "New Year's Day")
>>> holidays[0] < holidays[5]
True
Two shortcuts are available:
.. code:: python
>>> from czech_holidays import czech_easter, czech_christmas
>>> czech_easter(2022)
Holiday(date=datetime.date(2022, 4, 18), name='Velikonoční pondělí', name_en='Easter Monday')
>>> czech_christmas(2022)
Holiday(date=datetime.date(2022, 12, 24), name='Štědrý den', name_en='Christmas Eve')
The aim of this library is to simplify work with Czech public holidays in current applications, thus it does not provide any historical data:
.. code:: python
>>> czech_holidays(2013)
Traceback (most recent call last):
NotImplementedError: ...
Install using poetry <https://python-poetry.org/>
_::
git clone git@github.com:honzajavorek/czech-holidays.git
cd czech-holidays
poetry install
Then run tests::
pytest
© 2022 Honza Javorek mail@honzajavorek.cz
This work is licensed under MIT license <https://en.wikipedia.org/wiki/MIT_License>
_.
FAQs
Python package with Czech public holidays
We found that czech-holidays 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
Research
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
Research
Security News
Attackers used a malicious npm package typosquatting a popular ESLint plugin to steal sensitive data, execute commands, and exploit developer systems.
Security News
The Ultralytics' PyPI Package was compromised four times in one weekend through GitHub Actions cache poisoning and failure to rotate previously compromised API tokens.