Skip to main content
https://api.travis-ci.org/moremoban/pypifs.svg https://codecov.io/github/moremoban/pypifs/coverage.png https://badge.fury.io/py/pypifs.svg https://pepy.tech/badge/pypifs/month https://img.shields.io/github/stars/moremoban/pypifs.svg?style=social&maxAge=3600&label=Star https://dev.azure.com/moremoban/pypifs/_apis/build/status/moremoban.pypifs?branchName=master

It helps perform file operations over the python package. It installs the python package and returns python file system 2’s OSFS instance.

The idea originates from moban, which uses python package as a vehicle to have versioned templates for the creation of a new python package. Surely, it can be implemented in any other ways but moban v0.6.0 mandates python file system 2 interface. Hence this library is written.

Get a file inside a python package

>>> import fs
>>> pypi_fs = fs.open_fs("pypi://pypi-mobans-pkg/resources/templates")
>>> pypi_fs.readtext("_version.py.jj2")
'__version__ = "0.0.2"\n__author__ = "C.W."\n'

List files of interest

>>> pypi_fs = fs.open_fs("pypi://pypi-mobans-pkg/resources")
>>> for path in pypi_fs.walk.files(filter=['*.jj2']):
...     print(path)
...
/templates/requirements.txt.jj2
/templates/installation.rst.jj2
/templates/test.script.jj2
/templates/conf.py.jj2
/templates/_version.py.jj2
/templates/Pipfile.jj2
/templates/min_requirements.txt.jj2
/templates/README.rst.jj2
/templates/badges.rst.jj2
/templates/__init__.py.jj2
/templates/NEW_BSD_LICENSE.jj2
/templates/MANIFEST.in.jj2
/templates/CHANGELOG.rst.jj2
/templates/travis.yml.jj2
/templates/setup.py.jj2
/templates/gitignore.jj2
/templates/lint.script.jj2
/templates/tests/requirements.txt.jj2
/templates/docs/make.bat.jj2
/templates/docs/Makefile.jj2
/templates/docs/index.rst.jj2
/templates/docs/source/conf.py.jj2
/templates/docs/source/index.rst.jj2

Does it write?

Yes, it will write as you can do so without using pypifs. But, it is never the intention of pypifs.

Installation

You can install pypifs via pip:

$ pip install pypifs

or clone it and install it:

$ git clone https://github.com/moremoban/pypifs.git
$ cd pypifs
$ python setup.py install

Change log

0.0.2 - 13.5.2020

updated

  1. #8: suppress pip install std output

  2. #6: added license text in the package

0.0.1 - 18.8.2019

first release

  1. what a feat!

Metadata

Release files for pypifs 0.0.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pypifs 0.0.2
File Size Uploaded
pypifs-0.0.2.tar.gz 5.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for pypifs 0.0.2
File Interpreter ABI Platform
pypifs-0.0.2-py2.py3-none-any.whl Python 2, Python 3 none any Details

Total release size: 9.2 kB

Release files / pypifs-0.0.2.tar.gz

Download URL pypifs-0.0.2.tar.gz
Size 5.4 kB
Tags Source
SHA-256 checksum
How to use checksums
cb3e2bca4a4c370dd212691fa3fc560167d0cd1817013617cfb71e51b6ed4ecd
BLAKE2b-256 checksum
How to use checksums
4de264ff2e7e6a3facd5a124645c01a9dbed4bf1218ac151edc8fc41387f7bfd
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.46.0 CPython/3.8.2

Release files / pypifs-0.0.2-py2.py3-none-any.whl

Download URL pypifs-0.0.2-py2.py3-none-any.whl
Size 3.8 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
3d71ed935cdda504b8bae9637d90bfa3458c38997d59baa809b950d5771ade90
BLAKE2b-256 checksum
How to use checksums
614420538d06dca7be4628642c5d846e72dcffe30d7940d12ae134b1bd510503
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.46.0 CPython/3.8.2

Release history Release notifications | RSS feed

This release

0.0.2 This release

2 release files

0.0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page