Skip to main content

personal lib

Project description

personal python lib Build Status

legacy python lib see xsthunder/python-lib: useful python pieces of code

code and release

  1. code at xsthunder/xs_lib at master

  2. update xs_lib/version.py at master· xsthunder/xs_lib

  3. merge to releae and travis will deploy to pip

TODO

Features

  1. Full test with traivis to make sure things are on rail.
  2. list of function see doc

Install and Run

Install via xs-lib · PyPI

  1. pip install xs-lib

Use in Code

use for single ipynb file

export the ipynb file

import xs_lib.common as common

# this will choose con tqdm
for i in common.tqdm(range(3)):
    print(i)
nbe = common.NBExporter()
nbe('./pdb.ipynb', to='./')

use for projcet

clone xsthunder/jupyter_dev_template

Use in cli

nb2py --help

optional pakage tqdm

conda install tqdm

Usage suggestion

add #test_export to top of the code cell which will be exported to test and standard file.

add #export to top ot the code cell which will be exported to standard file.

use Sure 1.4.7 - Documentation — sure 1.4.7 documentation for #test_export.

Development

Environment Setup

bash ./config/create-env.sh for conda

deps

  1. not all deps are necessary. only ipython are set in the setup.py/deps.
  2. xs_lib.common supports dynamic import. feel free to import.
  3. to import other modules, please install corresponding deps first or you may come across import error.
  4. It's recommanded to install all packages listed in create-env.sh

code structures

Ref

deployment - How can I use setuptools to generate a console_scripts entry point which calls python -m mypackage? - Stack Overflow

Packaging Python Projects — Python Packaging User Guide

notebook2script from course-v3/nbs/dl2 at master · fastai/course-v3

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

xs_lib-0.0.8.tar.gz (7.3 kB view details)

Uploaded Source

File details

Details for the file xs_lib-0.0.8.tar.gz.

File metadata

  • Download URL: xs_lib-0.0.8.tar.gz
  • Upload date:
  • Size: 7.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.6.1 requests/2.25.1 setuptools/51.1.1 requests-toolbelt/0.9.1 tqdm/4.55.0 CPython/3.8.5

File hashes

Hashes for xs_lib-0.0.8.tar.gz
Algorithm Hash digest
SHA256 65a90985ca3d1351abe38716b8d194d4cd22bc6c5aad66a36a09b9594cd43a71
MD5 c4c6350db0d2fe1f5cd377d4042b51a8
BLAKE2b-256 1b665b853d08f903b4e7ac0d7d99b36c6047d69f3505609387b98120ecc83d04

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