Skip to main content

Here is everything frequently use in python.

Project description

Table of Contents

Here is everything frequently use in python.

Prologue

I often need to configure a new Python development environment. Whether it is to help others or for myself, it is very troublesome to manage packages with pip. Besides, there are fascinating and impressive ipython extensions, and every installation of them has to bother Google again.

Therefore, I created this napy.

This package is still under development, and although is only for myself now, you can use it as you like.

Introduction

Napy includes some packages that I frequently use in python, such as requests, for crawlers; sympy for mathematics. Also, napy has some ipython extensions I write. A template Napy also has that I often use (of course, it's still straightforward now). Hope you like it.

Due to the .dir-local.el contains (org-html-klipsify-src . nil), it is warning that it is not safe.

Usage

Tools (Libs)

Utility

Flatten

Flatten list of iterable objects.

from napy.tools import flatten, flatten_str

list(flatten([1, 2, "ab", [3, "c", [4, ["d"]]]]))
# [1, 2, "ab", 3, "c", 4, "d"]

list(flatten("abc"))
# ["a", "b", "c"]
# regard "abc" as ["a", "b", "c"]

list(flatten_str([1, 2, "ab", [3, "c", [4, ["d"]]]]))
# or list(flatten([1, 2, "ab", [3, "c", [4, ["d"]]]], True))
# [1, 2, "a", "b", 3, "c", 4, "d"]

Comand Line Tools

Template

Crawler

$ napy template --help
Usage:
  template [options]

Options:
  -c, --category[=CATEGORY]       Category of template
  -o, --output[=OUTPUT]           Output file (default: "stdout")
  -y, --yes                       Confirmation
  -h, --help                      Display this help message
  -q, --quiet                     Do not output any message
  -V, --version                   Display this application version
      --ansi                      Force ANSI output
      --no-ansi                   Disable ANSI output
  -n, --no-interaction            Do not ask any interactive question
  -v|vv|vvv, --verbose[=VERBOSE]  Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug

Help:
 Template command line tool.

It will generate this:

from requests_html import HtmlSession as s
import requests as req


def crawler() -> None:
    """Crawler."""
    pass


if __name__ == "__main__":
    pass

More

Still under development.

Packages

Normal

  • better_exceptions: Pretty and helpful exceptions, automatically.
  • pendulum: Python datetimes made easy.
  • tqdm: Fast, Extensible Progress Meter.

Science

  • jupyter :: Jupyter Notebook + IPython: Jupyter metapackage. Install all the Jupyter components in one go.
  • numpy: NumPy: array processing for numbers, strings, records, and objects
  • pandas: Powerful data structures for data analysis, time series, and statistics
  • sympy: Computer algebra system (CAS) in Python

Crawler

  • requests: Python HTTP for Humans.
  • requests_html: HTML Parsing for Humans.
  • BeautifulSoup4: Screen-scraping library

Development

  • cleo: Cleo allows you to create beautiful and testable command-line interfaces.

Epoligue

History

0.2.1 <2018-12-22 Sat>

Add a new tool flatten

0.1.1 <2018-12-17 Mon>

Use README.md instead of README.org

0.1.0 <2018-12-16 Sun>

The beginning of everything

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

napy-0.2.1.tar.gz (44.7 kB view details)

Uploaded Source

Built Distribution

napy-0.2.1-py3-none-any.whl (127.5 kB view details)

Uploaded Python 3

File details

Details for the file napy-0.2.1.tar.gz.

File metadata

  • Download URL: napy-0.2.1.tar.gz
  • Upload date:
  • Size: 44.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/0.12.10 CPython/3.7.1 Darwin/18.2.0

File hashes

Hashes for napy-0.2.1.tar.gz
Algorithm Hash digest
SHA256 3577c83e9400e934922cfbb9e70e0eacbab79ca7ed58a45cebf5af8086881a5c
MD5 0be4a867873a4072d0dbcaecbe9d7a80
BLAKE2b-256 77bcc02f75791c8a8f91321066e904d47bcb666039d1b7025b15f18f07067375

See more details on using hashes here.

File details

Details for the file napy-0.2.1-py3-none-any.whl.

File metadata

  • Download URL: napy-0.2.1-py3-none-any.whl
  • Upload date:
  • Size: 127.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/0.12.10 CPython/3.7.1 Darwin/18.2.0

File hashes

Hashes for napy-0.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 9252282ab34a1b254cc47a10a5750525d228c8795361ea06a8444fb973e4f459
MD5 78c9b392def6221cc71d71316fd55f87
BLAKE2b-256 314d3f09cccc6138b775da298c0579a5eff0a53617a31e34d474588ff3671361

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page