semvec/pypi-packages huggingface dataset:
DInk 0.0.5
('The DInk Python library provides a pythonic interface to the DInk API.',)
License: MIT
Keywords: api dink pdf document

# DInk Python Library

The DInk Python library provides a pythonic interface to the DInk API. It includes an API client class, and a set of resource classes.


## Installation

```
pip install dink
```

## Requirements

- Python 3.7+


# Usage

```Python

import dink
import zipfile


client = dink.Client('your_api_key...')

assets = io.BytesIO()
with zipfile.ZipFile(assets, mode='w', compression=zipfile.ZIP_DEFLATED) as z:

    z.write('includes/footer.html')
    z.write('css/document.css')
    z.write('images/logo.png')
    z.write('fonts/company-font.otf')

assets.seek(0)

pdfs = dink.resources.PDF.create(
    client,
    template_html='''
<html>
    <head>
        <title>{{ title }}</title>
        <link
            rel="stylesheet"
            type="text/css"
            media="print"
            href="file://css/document.css"
        >
    </head>
    <body>
        <img src="images/logo.png" alt="logo">
        <h1>{{ title }}</h1>
        <main>
            {{ name }} you worked {{ hours_worked }} hours this week you
            {% if hours_worked > 40 %}
                star!
            {% else %}
                lazy bum!
            {% endif %}

            <img
                src="chart://hours_chart"
                alt="Hours worked each day this week"
                >
        </main>
        {% include 'includes/footer.html' %}
    </body>
</html>
    ''',
    document_args={
        'burt': {
            'hours_worked': 10,
            'hours_chart': dink.charts.BarChart(
                data=[{'data':  [1, 1, 2, 4, 2]}],
                labels=['Mon', 'Tue', 'Wed', 'Thu', 'Fri'],
                spacing=0.2
            ).to_json_type()
        },
        'harry': {
            'hours_worked': 44,
            'hours_chart': dink.charts.BarChart(
                data=[{'data':  [8, 8, 10, 8, 10]}],
                labels=['Mon', 'Tue', 'Wed', 'Thu', 'Fri'],
                spacing=0.2
            ).to_json_type()
        }
    },
    global_args={
        'title': 'Weekly sales report'
    },
    assets=assets
)

print(pdfs['burt'].store_key)

>> 'burt.ue32uw.pdf'

```
flask-skeleton 1.0.2
Quick start a flask app
License: MIT
Requires Python: >=3

# Flask Skeleton
Basic flask app scaffolding.

Includes a basic app structure and templates.

## Install with pip
`$ pip install flask-skeleton`

## Run from the command line
`$ create-flask-app [Options] APPNAME`

Run `$ create-flask-app --help` for usage.

## Setup
1. `cd` into the app directory
2. Activate virtual environment: `$ source env/bin/activate`
3. Run tests: `$ python -m unittest`
4. Create database: `$ flask create-db`
5. Run: `$ flask run`

Source: [Flask Skeleton](https://github.com/enwawerueli/flask-skeleton).

Happy coding!
ksp.py 0.0.1
An API wrapper for KSP.
License: MIT
Keywords: ksp,products,onlineshopping,api,wrapper,python

<h1 align="center">ksp.py</h1>

<p align="center">
  <a href="https://www.codefactor.io/repository/github/adam757521/ksp.py"><img src="https://img.shields.io/codefactor/grade/github/adam757521/ksp.py?style=flat-square" /></a>
  <a href="https://pepy.tech/project/ksp.py"><img src="https://img.shields.io/pypi/dm/ksp.py?color=green&style=flat-square" /></a>
  <a href="https://pypi.org/project/ksp.py/"><img src="https://img.shields.io/pypi/v/ksp.py?style=flat-square" /></a>
  <a href=""><img src="https://img.shields.io/pypi/l/ksp.py?style=flat-square" /></a>
    <br/>
  <a href="#">Documentation</a>
</p>

<p align="center">
   An API wrapper for KSP.
    <br/>
  <b>The documentation is not done yet.</b>
</p>

Features
-------------

- Fetch full product data easily (includes stock, tags, price, etc)
- Look for queries easily.
(MORE COMING SOON)

Installation
--------------

Installing ksp.py is very easy.

```sh
python -m pip install ksp.py
```

Examples
--------------

### Simple product stock viewer. ###

```py
import time

import ksp

client = ksp.Client(ksp.Languages.ENGLISH)
cache = []

while True:
    product = client.get_product(...)

    if product and product.stock:
        available_branches = [
            branch for branch, status in product.stock.items() if status
        ]

        for branch in available_branches:
            if branch not in cache:
                print(f"Branch '{branch}' has been resupplied!")

        for branch in cache:
            if branch not in available_branches:
                print(f"Branch '{branch}' ran out of stock!")

        cache = available_branches

    time.sleep(2)
```

TODO
--------------

- Add async support.

Known Issues
--------------

- Currently, None!

**Incase you do find bugs, please create an issue or a PR.**

Support
--------------

- **[Documentation](#)**