semvec/pypi-packages huggingface dataset:
package-extras 0.3.0
Dummy package to mark extras installation
License: MIT
Requires Python: >=3.7,<4.0

## extras

[![PyPI](https://img.shields.io/pypi/v/package-extras)](https://pypi.org/project/package-extras/)
![PyPI - Python Version](https://img.shields.io/pypi/pyversions/package-extras)
[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)
[![EditorConfig](https://img.shields.io/badge/-EditorConfig-grey?logo=editorconfig)](https://editorconfig.org/)

Package that allows to make assertions about [extras](https://packaging.python.org/en/latest/tutorials/installing-packages/#installing-extras) being installed or not.

For the detailed explanation read [this blog post](https://bmwlog.pp.ua/deprecation-of-package-extras/).

### Usage

For the `pyproject.toml` users

```toml
[tool.poetry.dependencies]
package-extras = { version = "^0.2.0", optional = true }
# your actual extras below
psycopg2 = { version = "^2.9", optional = true }
mysqlclient = { version = "^1.3", optional = true }

[tool.poetry.extras]
databases = ["package-extras", "mysqlclient", "psycopg2"]
```

`setup.py` equivalent

```python
extras_require = \
{'databases': ['package-extras>=0.2.0',
               'psycopg2>=2.9,<3.0',
               'mysqlclient>=1.3,<2.0']}

setup_kwargs = {
    # ... rest of the arguments
    'extras_require': extras_require,
}
setup(**setup_kwargs)
```

Add this or similar block to your code (likely top-level `__init__.py` file)

```python
import warnings

try:
    import package_extras
except ModuleNotFoundError:
    pass
else:
    warnings.warn(
        "'test_package[databases]' extra is deprecated "
        "and will be removed in a future release.",
        category=DeprecationWarning,
        stacklevel=2,
    )
```

Or in case you want to assert the opposite (make sure that extras have been installed)

```python
import warnings

try:
    import package_extras
except ModuleNotFoundError:
    warnings.warn(
        "You are going to use functionality that depends on 'databases' extras. "
        "Please install 'test_package[databases]' to proceed.",
        category=ImportWarning,
        stacklevel=2,
    )
```

> NOTE: `ImportWarning` is ignored by default, so you either need to run `python -W all` or use `RuntimeWarning` instead.

After installation via `pip install test_package[databases]` your package users will get this warning.

```console
>>> import test_package
DeprecationWarning: 'test_package[databases]' extra is deprecated and will be removed in a future release.
```

### Development

```bash
$ poetry install
$ poetry build

$ poetry config pypi-token.pypi my-token
$ poetry publish
```
Flask-Geolocation 0.1.1
getting user geolocation for Flask
License: MIT
Requires Python: >=3.7

# Flask-Geolocation
Flask-Geolocation aims to help get geolocation informaton for Flask app.
It only supports Maxmind IP Database now.

# Installation
install the extension with pip
```python
pip install flask-geolocation
```

# Usage
initialization
```python
from flask-geolocation import GeoManager

# ip_data_path can be a relative path to your project root.
geo_manager = GeoManager("ip_data_path")
geo_manager.init_app(app)
```

get geolocation related info with flask global variable current_geo
```python
from flask-geolocation import current_geo

current_geo.ip
current_geo.country_symbol
current_geo.country_name
current_geo.timezone
```

you can also use current_geo in template
```html
<html en="lang">
  <head>
  </head>
  <body>
    <p>ip: {{current_geo.ip}}</p>
    <p>country_symbol: {{current_geo.country_symbol}}</p>
    <p>country_name: {{current_geo.country_name}}</p>
    <p>timezone: {{current_geo.timezone}}</p>
  </body>
</html>
```
pysdbapi 0.5.0
pySDBAPI - simple database API. Use a couple of lines to make a request
License: MIT
Requires Python: >=3.10,<4.0
Keywords: python,database,prettytable

# pysdbapi

[![Dependencies](https://img.shields.io/librariesio/github/axemanofic/pysdbapi)](https://pypi.org/project/pysdbapi/)
[![Version](https://img.shields.io/pypi/v/pysdbapi?color=green)](https://pypi.org/project/pysdbapi/)
[![Downloads](https://pepy.tech/badge/pysdbapi/month)](https://pepy.tech/project/pysdbapi)
[![Downloads](https://pepy.tech/badge/pysdbapi/week)](https://pepy.tech/project/pysdbapi)

pySDBAPI - simple database API. Use a couple of lines to make a request

## Features

* Use a single decorator to complete a request. Receive OrderedDict immediately in response.
* If you need to display the table in the console, then use the __show_table__ parameter
* So far only SQLite is supported, support for other databases (MySQL, PostgreSQL and others) will be added in the future

## Installation

```text
poetry add pysdbapi
```

or

```text
pip install pysdbapi
```

### Optional dependencies

This dependency is needed to print the table to the console

```text
poetry add pysdbapi[pretty]
```

## Example SQLite

This code sends a message on your behalf to the chat

```python
import pysdbapi

DATABASE_SETTINGS = {"database": "test.db"}

db = pysdbapi.DBApi(DATABASE_SETTINGS)

@db.execute_sql()
def get_all_posts():
    return """SELECT * FROM posts"""


@db.execute_sql(show_table=True)
def get_all_posts__table():
    return """SELECT * FROM posts"""
```

Result:

```
# Example show table

+----+-----------+----------------------+
| id |   title   |         text         |
+----+-----------+----------------------+
| 1  | Article 1 | Some text in article |
| 2  | Article 2 | Some text in article |
| 3  | Article 3 | Some text in article |
| 4  | Article 4 | Some text in article |
| 5  | Article 5 | Some text in article |
| 6  |   dasdas  |       sddsdas        |
+----+-----------+----------------------+
```
cvd-risk-scores 1.0.2
A Python package for computing cardiovascular disease risk using clinically validated models.
License: MIT
Requires Python: >=3.7,<3.10

[![CircleCI](https://circleci.com/gh/francescopisu/CVD-risk-scores.svg?style=shield)](https://circleci.com/gh/francescopisu/CVD-risk-scores)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)

# CVD-risk-scores
A Python package for computing cardiovascular disease risk using clinically validated models.

Note: **This is a work in progress**

## Install
This package is available on PyPI
```bash
pip install cvd-risk-scores
```

## Getting started

`CVD-risk-scores` is based upon the `torch` philosophy of callable objects. Each `RiskModel` subclass is a callable upon 
initialisation, taking an array-like of subjects, each defined by some variables of interest, and returning an array-like of `float` values corresponding to cardiovascular risk scores.

```python
import cvd_risk_scores

# Instantiate the risk model we are interested in
risk_model = cvd_risk_scores.FraminghamRiskScore()

# Define our subject, in this case using a dictionary
subject = {
  "gender": "female",
  "age": 61,
  "SBP_nt": 124,
  "SBP_t": 0,
  "TotalChol": 180,
  "HDL": 47,
  "smoker": True,
  "diabetes": False
}

# Create a numpy array from features values
data = np.array([list(subject.values())])

# Alternatively:
#data = np.array([
#  ["female", 61, 124, 0, 180, 47, True, False]
#])

# define a dictionary mapping our own column names to the names
# expected by the risk score model.
# if data is either a numpy array or a list of lists,
# the `columns_map` mapping must present the columns
# in the correct order so that data can be cast to a pandas DataFrame.
columns_map = {
  "gender": "sex",
  "age": "age",
  "SBP_nt": "SBP_nt",
  "SBP_t": "SBP_t",
  "TotalChol": "tch",
  "HDL": "HDL",
  "smoker": "smoking",
  "diabetes": "diabetes"
}

# Compute the risk score
risk_score = risk_model(data=data, columns_map=columns_map)
```

## About

`CVD-risk-scores` is a Python package for computing cardiovascular disease risk using clinically validated models. It exposes an object-based API for interacting with risk models that is inspired by the `torch` paradigm of callable objects.

Available risk models:
* Framingham Risk Score


## References
[1] D'Agostino, Ralph B Sr et al. “General cardiovascular risk profile for use in primary care: 
the Framingham Heart Study.” Circulation vol. 117,6 (2008): 743-53. doi:10.1161/CIRCULATIONAHA.107.699579