Skip to main content

python interface for locate command

Project description

##PyLocated

A Locatedb interface for python

##Installing

```
pip install pylocated

```

##Usage

```python
from pylocated import locatedb

#if you want to use default locatedb path you
#can use the class methods for it.

buffer = locatedb.find('sample.py', limit=20, ignore_case=False, regex=None)
files = buffer.getvalue()
print files

#if you want to setup you own path to locatedb

locate_db = locatedb(db_path='/var/bin/hello')
buffers = locate_db.find("sample.py", limit=20, ignore_case=False, regex=None)
print buffers.getvalue()

```

##Api

###locatedb.find or instance.find(): [name, limit=None, ignore_case=False, regex=None]
used to find the particular files in system.
where pattern inside regex find the matches of path.

###locatedb.count or instance.count: [name]
used find the number of occurences for that particular word.
equivalent to locate -c

###locatedb.statistics or instance.statistics : [name]
used to give the disk statistics
equivalent to locate -S

###locatedb.version:
return the version of locatedb you are using.


##License:
<b>MIT</b>
&copy 2015 plasmashadow plasmashadowx@gmail.com

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

pylocated-2.0.0.tar.gz (2.9 kB view details)

Uploaded Source

File details

Details for the file pylocated-2.0.0.tar.gz.

File metadata

  • Download URL: pylocated-2.0.0.tar.gz
  • Upload date:
  • Size: 2.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for pylocated-2.0.0.tar.gz
Algorithm Hash digest
SHA256 1663358e76921f4c6a780002e6e147f32c2dfbb249e18f1bc3341c65cbaa13db
MD5 2e1aab12d93535b6faff2790872807fd
BLAKE2b-256 60ca8496cc60bfac69835e10a6e2821b66e389376bd108df70c3260b0a87cda8

See more details on using hashes here.

Supported by

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