Giter VIP home page Giter VIP logo

marklogic_python's Introduction

MarkLogic Management In Python

Official MarkLogic Python Scripting Library !!!!

MarkLogic Engineering is providing a Python library for scripting. That means this library will continue to live here, and if something comes in, I'll look at fixing it, but new MarkLogic Python users should go to https://github.com/marklogic/python_api for their Python scripting needs. I will be contributing to that repository and I encourage you to start with that repository.

For those of you who have contributed, thank you!

About

Good news everybody! MarkLogic has a fantastic REST-based management API. You can use anything that produces or consumes REST to talk to the MarkLogic server and create database, manage clusters, add forests, etc. This project does a few things.

  1. Gives lovers of other languages an example of how to leverage the API.
  2. Provides under-cover Pythonistas a chance to use Python to script MarkLogic operations.
  3. As a possible spring board for later integration with other management tools.
  4. As a way to explore more complex and automated management with MarkLogic (like test setup and teardown).
  5. Possibly serve as a way to implement a kind of “migration” API for MarkLogic

Above all else the scripting should be simple. My goal (outside of imports) is to allow people to script database creation and load in about 5 lines of Python. Ideally, it whould be about 2 lines, for just a basic database. My other goal was to include enough inline comments, named parameters, and to move away from configuration files so that IDEs like PyCharm would provide meaningful auto-completion and support.

So what is this project not going to do?

  • At this time I don’t expect to create a Python alternative to the Java or JavaScript APIs.
  • Support every possible feature - instead I’m focusing on simplicity.

This is a community-driven project to build a Python wrapper for the MarkLogic REST API.

Features

  • Database creation, deletion, and configuration
  • Application server creation, deletion, and configuration
  • Load content from filesystem into a database

Getting Started

  1. Install MarkLogic (http://developer.marklogic.com/products)
  2. Follow the very simple instructions to install the MarkLogic server. (Note that if you’re using a RedHat based distro, you should install LSB and include –no-deps when installing the RPM if you get a warning about GLIBC 2.4).
  3. Checkout the MarkLogic python package from http://github.com/paul-hoehne/MarkLogic_Python
  4. Install using easy_install (easy_install /path/to/MarkLogic_Python)

At this point you should be able to script away. In the near future you’ll be able to directly install using easy_isntall without first checking out the project.

Running Tests

To run tests, copy the example_resources.py to resources.py file. Change the values of hostname, admin, and password in resources.py to match the values for your environment. The tests reference these values to connect with your MarkLogic server.

Support

Support for the MarkLogic_Python project comes from the developer community.

marklogic_python's People

Contributors

paul-hoehne avatar ndw avatar dmcassel avatar glenfant avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.