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!
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.
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?
This is a community-driven project to build a Python wrapper for the MarkLogic REST API.
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.
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 for the MarkLogic_Python project comes from the developer community.