Main > Reference Manual > Introduction > Architecture > Core library
The frePPLe binaries are a collection of shared libraries: a core library frepple.so (frepple.dll on Windows) and an additional shared library for each extension module.
The extension modules are loaded dynamically as plugins by frePPLe.
The frePPLe shared library can be used in different ways by applications.
Below is a list of some common ways to deploy frePPLe, but additional scenarios are definitely feasible.
The core library does NOT have any user interface at all.
Command line application

The command-line application reads input data from XML files (or from the standard input) and can also execute Python scripts.
It executes all commands defined in the input data (which will typically also involve some Python code to solve the model and write the results back into flat files or a database) and then exits.
The program exit code reflects any processing errors.
FrePPLe comes with an embedded interpreter for the Python language (see http://www.python.org).
Python is a dynamic object-oriented programming language. It comes with extensive standard libraries for database access, a wide range of internet protocols (such as ftp, http, https, smtp, pop, xml-rpc, soap, ...), various data formats (such as xml, csv, compression, encryption), ...
The Python interpreter has a rich API to access the frePPle objects in memory. This allows custom logic to be implemented in an easy and flexible way, with full access to the rich Python standard libraries.
Example usage:
frepple file1.xml frepple file2.xml file3.xml my_commands.py frepple dir_with_xml_and_python_files command | frepple
Use the option "-help" or "-?" to get a list of possible flags that can be passed on the command line.
This command line application is used for all test cases.
Use frePPLe as a Python extension module

After importing the module, your Python program has full access all frePPLe objects and planning algorithms.
Example Python program:
import frepple print "Echoing demands:" for d in frepple.demands(): print " Demand:", d.name, d.due, d.item.name, d.quantity for i in d.operationplans: print " Delivery:", i.id, i.operation.name, i.quantity, i.end
An example Python script reading data from a database.
An example Python script writing planning results to CSV files.
Your C or C++ application links with frePPLe

Your application can be link with the frePPLe shared library.
Use the header file plannerinterface.h for the high-level interface declarations.
Use header file frepple.h when you need low-level access.
Since frePPLe is coded in C++:
- C applications will need some wrapper code to catch exceptions correctly and assure C linkage.
- Because of the C++ name mangling frePPLe and your application will need to be compiled by the same compiler.
FrePPLe as a web service

FrePPLe comes with extension modules that implement a SOAP or REST web service.
In a Service Oriented Architecture, frePPLe will hold the plan information in memory and make it available on-line. Other systems can use the service to query and update the information to build composite applications.
Your java/perl/ruby/VB/.NET application accesses the frePPLe shared library

Most modern languages and tools have the capability to access functions in shared libraries.
SWIG (see http://www.swig.org/) is a tool that can help to generate the integration code with a wide range of high-level languages, such as Java, Ruby, Perl, Tcl, PHP, ...
An example setup is provided in the subdirectory contrib/scripting.
This exposed API is not very rich and this interface is not actively maintained any more.