This is a pre-production deployment of Warehouse, however changes made here WILL affect the production instance of PyPI.
Latest Version Dependencies status unknown Test status unknown Test coverage unknown
Project Description

filemapper

This module is designed to create variables for files that are to be accessed collectively. Since files tend to take up a lot of memory, it is not advised to use this module to keep multiple files in a directory open. The mapper works by creating variables with same file name and maps them(Do not confuse this for the built-in maps() function) to their file location. These variables can then be accessed like regular files using read(). All the functions defined here return a tuple of successfully processed files.

Compatability

Tested Combinations:
  • Windows 10/8/7
  • Most Linux Distros
  • Python (3.5,3.4,2.7)

Using this module in any combination other than those listed above may produce unexpected results.

Installation

pip install filemapper

Usage

>>>import filemapper as fm
>>>help(fm) #This will display help for this module
Creating variables
>>>import filemapper as fm
>>>print fm.create('resources') #Creates variables for files within the folder resources
{'nouns.dat':u'resources\\nouns.dat','adjectives.dat':u'resources\\adjectives.dat'}
>>>f = open(fm.read('nouns.dat')) #Passed into read() before it can be used.
>>>for i in f:print i #Prints out the whole 'nouns.dat'
A-bomb
A-bombs
A-frame
[Trunctuated 90959 Lines]
zymurgy

Example Case

>>>f = fm.create('resources')
>>>new_f = [sub_f[0] for sub_f in f.items()]
>>>for i in new_f: #Only prints the content of files that start with 'a'
...    if i[0] == 'a':
...        for x in  open(i, 'r'):print x
[Stdout Ommitted due to large size]
Loading Files
>>>print fm.load('resources','w') #Omittiing the second argument will default to read only mode
('nouns.dat','adjectives.dat')
>>>for i in fm.read('nouns.dat'):print i
[Stdout Ommitted due to large size]
Closing Files
>>>fm.close('nouns.dat')
('adjectives.dat')
>>>fm.close() #Closes all the files
Release History

Release History

0.1.2

This version

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.1

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

Download Files

Download Files

TODO: Brief introduction on what you do with files - including link to relevant help section.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
filemapper-0.1.2-py2.py3-none-any.whl (4.2 kB) Copy SHA256 Checksum SHA256 3.5 Wheel Jun 17, 2016
filemapper-0.1.2.zip (8.2 kB) Copy SHA256 Checksum SHA256 Source Jun 17, 2016

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS HPE HPE Development Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting