Worldometer

Latest version: v2.0.0

Safety actively analyzes 625645 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

2.0.0

Added

- **New module structure (22)**
- new scraper module;
- new world module for public api;
- get home page counters, like in the old api, but now having a special data class;
- get population and geography data;
- set new dependencies;
- new mapped pages;
- add some tests.
- **Add docstrings to the new api (23)**
- **Define explicit fields in all counter dataclasses (26)**

Changed

- **Reformulation of all docs (24)**
- new fully documented API;
- new package logo and icon.
- **Use the new API in the old core module. This is a temporary measure until the module is completely removed. (25)**
- warn about the deprecation of the old API and indicate the use of the new one.
- **Update all project metadata (27)**
- **Change package manager and add action to run tests (29)**
- **Support only Python `>=3.9, <3.12` (29)**

Removed

- **Removed support for Python 3.7 and 3.8 (29)**

Deprecated

- **`worldometer.core` and `worldometer.api` deprecated (25)**

Fixed

- **Fix old API (25)**
- fix: import "requests_html" could not be resolved (12)
- fix: problem with Importing and Crashing (13)
- fix: issue with "sanitize_metrics" method (18)
- fix: navigation Timeout Exceeded Error (20)
- fix: import error (21)

1.0.1

Fix error on build docs and update version from 1.0.0 to 1.0.1

Features

- Integration of readthedocs config file;
- Remove incorret title docstring of worldometer.core.

1.0.0

This is first stable version of worldometer module 🎉

Features

- **Now the old attribute `metrics` of `Worldometer` class is a method:**
python
>>> from worldometer import Worldometer
>>> w = Worldometer()
>>> w.metrics()
[
7845087963,
15741371,
5676,
6608605,
2383,
9132766,
...
]

- **Return dict structure in all functions of `worldometer.api` submodule:**
python
>>> from worldometer import api
>>> api.get_metric_of(label='computers_produced_this_year')
{'computers_produced_this_year': 27760858}

>>> api.current_world_population()
{'current_world_population': 7845085923}

- **Refactor all docstring in the module to make it more explicit and explanatory.**

Before in `worldometer.api` module:
python
"""
worldometer.api
---------------
Implement a simplified api of worldometer.Worldometer Class.
API usage:
>>> from worldometer import api
>>> api.current_world_population()
7845085923
>>> api.tweets_sent_today()
4539558
>>> api.get_metric_of(label='computers_produced_this_year')
27760858
More info in: github.com/matheusfelipeog/worldometer
"""


Now in `worldometer.api` module:
python
"""
worldometer.api
---------------

Implementation of a simplified API of the worldometer module.

Here you will find all the functions available to obtain the metrics separately.

Examples
--------
>>> from worldometer import api

All worldometer.api functions use the ``get_metric_of`` function at their core.
To use it, just enter the corresponding label:

>>> api.get_metric_of(label='computers_produced_this_year')
{'computers_produced_this_year': 27760858}

There is also a simplified and self-explanatory API that provides
functions corresponding to the labels.
Autocomplete tools from the editors/IDE will help you use these
functions without having to decorate all labels:

>>> api.current_world_population()
{'current_world_population': 7845085923}

>>> api.tweets_sent_today()
{'tweets_sent_today': 4539558}
"""

- **Created documentation with sphinx and hosting in [readthedocs.org](https://readthedocs.org):**
![image](https://user-images.githubusercontent.com/50463866/108547358-233b1680-72c9-11eb-8079-e5b948963084.png)

0.1.1

**Feature:**

- At times the chromium did not have enough time to open and render the content, this raised an exception. The **timeout** was doubled to correct this problem.
**Before:** timeout=15
**Now:** timeout=30

0.1.0

**First published version of the Worldometer module.**

Links

Releases

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.