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/ at master· xsthunder/xs_lib

  3. merge to releae and travis will deploy to pip



  1. Full test with traivis to make sure things are on rail.
  2. xs_lib.ismain.main(__name__, main) to define entrance
  3. xs_lib.common.IN_TRAVIS and xs_lib.common.IN_JUPYTER to tell current state, also allow bash env setting to true or false to overwrite.
  4. xs_lib.common.CLI_TEST is read from bash env to control cli.

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)):
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.


Environment Setup

bash ./config/ for conda


  1. not all deps are necessary. only ipython are set in the
  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

code structures


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.

Files for xs-lib, version 0.1.0
Filename, size File type Python version Upload date Hashes
Filename, size xs_lib-0.1.0.tar.gz (9.6 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring DigiCert DigiCert EV certificate Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page