semvec/pypi-packages huggingface dataset:
mojapi 0.1.1
Python library for interacting with Mojang APIs
License: MIT
Keywords: minecraft mojang api

# mojapi
Python library for interacting with Mojang APIs.

# Installation
```
pip install mojapi
```

# Usage
Make basic API requests to Mojang as laid out at http://wiki.vg/Mojang_API. Where appropriate, timestamps are converted to native Python `datetime` objects, and base64 encoded JSON objects are automatically expanded.

```python
>>> from mojapi import *
>>> get_uuid('gozug')
{'id': 'bdc46881e95447b694e82d10bac42ccb', 'name': 'gozug'}
>>> get_detailed_profile('bdc46881e95447b694e82d10bac42ccb')
{'properties': [{'value': {'textures': {'SKIN': {'url': 'http://textures.minecraft.net/texture/1d9e8dafe7d87bb7cba7eb3d8d2d5bf58eab72ecdfdf9ecce3d1c03871c0'}}, 'profileId': 'bdc46881e95447b694e82d10bac42ccb', 'timestamp': datetime.datetime
(2016, 9, 8, 23, 44, 15, 472000), 'profileName': 'gozug'}, 'name': 'textures'}], 'id': 'bdc46881e95447b694e82d10bac42ccb', 'name': 'gozug'}
```

# Contributions
Contributions are welcome.
webhdfspy 0.3.5
A wrapper library to access Hadoop HTTP REST API
License: MIT
Keywords: hadoop webhdfs

=========
webhdfspy
=========

.. image:: https://badge.fury.io/py/webhdfspy.svg
    :target: http://badge.fury.io/py/webhdfspy

A Python 2/3 wrapper library to access `Hadoop WebHDFS REST API <https://hadoop.apache.org/docs/r1.0.4/webhdfs.html>`_


Installation
============

To install webhdfspy from PyPI::

    $ pip install webhdfspy


Python versions
===============

webhdfspy supports Python 2.7 and 3.4


Usage
=====
::
    
    >>> import webhdfspy
    >>> webHDFS = webhdfspy.WebHDFSClient("localhost", 50070, "username")
    >>> print(webHDFS.listdir('/'))
    []
    >>> webHDFS.mkdir('/foo')
    True
    >>> print(webHDFS.listdir('/'))
    [{u'group': u'supergroup', u'permission': u'755', u'blockSize': 0, u'accessTime': 0, u'pathSuffix': u'foo', u'modificationTime': 1429805040695, u'replication': 0, u'length': 0, u'childrenNum': 0, u'owner': u'username', u'storagePolicy': 0, u'type': u'DIRECTORY', u'fileId': 16387}]
    >>> print webHDFS.create('/foo/foo.txt', "just put some text here", True)
    True
    >>> print webHDFS.open('/pywebhdfs_test/foo.txt') 
    just put some text here
    >>> webHDFS.remove('/foo')
    True
    >>> print(webHDFS.listdir('/'))
    []

Documentation
=============

http://webhdfspy.readthedocs.org/en/latest/


Hadoop configuration
====================

To enable WebHDFS in Hadoop add this to your $HADOOP_DIR/conf/hdfs-site.xml: ::

        <property>
             <name>dfs.webhdfs.enabled</name>
             <value>true</value>
        </property>  

To enable append on HDFS you need to configure your hdfs-site.xml as follows: ::

        <property>
            <name>dfs.support.append</name>
            <value>true</value>
        </property>


More about WebHDFS: https://hadoop.apache.org/docs/r1.0.4/webhdfs.html