# CIF Application Programming Interface

**URL:** https://discourse.iucr.org/c/crystallographic-information-framework/cif-application-programming-interface/28.md

[Latest](https://discourse.iucr.org/latest.md) · [Categories](https://discourse.iucr.org/categories.md) · [Tags](https://discourse.iucr.org/tags.md)

---

## [About the CIF Application Programming Interface category](https://discourse.iucr.org/t/about-the-cif-application-programming-interface-category/36)

<div class="topic-metadata">

**Author:** [@system](https://discourse.iucr.org/u/system)\
**Replies:** 0\
**Last updated:** [December 20, 2011, 3:42am UTC](https://discourse.iucr.org/t/about-the-cif-application-programming-interface-category/36 "2011-12-20T03:42:40Z")

</div>

Forum for CIF developers to define an application programming interface for CIF software.

---

## [CIF API 0.4.2 Released](https://discourse.iucr.org/t/cif-api-0-4-2-released/159)

<div class="topic-metadata">

**Author:** [@jcbollinger](https://discourse.iucr.org/u/jcbollinger)\
**Replies:** 0\
**Last updated:** [January 21, 2016, 4:40pm UTC](https://discourse.iucr.org/t/cif-api-0-4-2-released/159 "2016-01-21T16:40:36Z")

</div>

Version 0.4.2 of the CIF API has now been released. It is available at the GitHub site, as usual, or a full distribution can be obtained directly from me. Changes from versions 0.4.0 and 0.4.1 are mostly bug fixes, but…

---

## [CIF API 0.3.0 Public Release](https://discourse.iucr.org/t/cif-api-0-3-0-public-release/156)

<div class="topic-metadata">

**Author:** [@jcbollinger](https://discourse.iucr.org/u/jcbollinger)\
**Replies:** 0\
**Last updated:** [June 9, 2015, 7:04pm UTC](https://discourse.iucr.org/t/cif-api-0-3-0-public-release/156 "2015-06-09T19:04:57Z")

</div>

I am pleased to announce the release of CIF API 0.3.0. This is the first public, production release of the CIF API. Notable changes from beta test release 0.2.0 include: CIF API is now offered for use under the term…

---

## [CIF API 0.2.0 released to Beta](https://discourse.iucr.org/t/cif-api-0-2-0-released-to-beta/143)

<div class="topic-metadata">

**Author:** [@jcbollinger](https://discourse.iucr.org/u/jcbollinger)\
**Replies:** 0\
**Last updated:** [October 21, 2014, 9:04pm UTC](https://discourse.iucr.org/t/cif-api-0-2-0-released-to-beta/143 "2014-10-21T21:04:26Z")

</div>

\[size=150\]I am pleased to announce the release of CIF API version 0.2.0 for beta testing.\[/size\] Among the CIF API’s high-level features are a fully-functional CIF 1.1/2.0 autodetecting parser, operating either to par…

---

## [Whitespace in table entries](https://discourse.iucr.org/t/whitespace-in-table-entries/127)

<div class="topic-metadata">

**Author:** [@jcbollinger](https://discourse.iucr.org/u/jcbollinger)\
**Replies:** 5\
**Last updated:** [September 15, 2014, 1:34pm UTC](https://discourse.iucr.org/t/whitespace-in-table-entries/127 "2014-09-15T13:34:51Z")

</div>

It is my interpretation of the changes document and of the DDLm working group archives that it is not syntactically correct for whitespace to appear between key and separating colon or between colon and value of a table …

---

## [Bare table keys](https://discourse.iucr.org/t/bare-table-keys/128)

<div class="topic-metadata">

**Author:** [@jcbollinger](https://discourse.iucr.org/u/jcbollinger)\
**Replies:** 0\
**Last updated:** [October 3, 2013, 3:21pm UTC](https://discourse.iucr.org/t/bare-table-keys/128 "2013-10-03T15:21:51Z")

</div>

For the record, I observe that although the parser will flag an error if the key of a table entry is bare or is a text block instead of being a quoted string, its recovery path from such errors will accept those keys. I…

---

## [Comments vs. whitespace](https://discourse.iucr.org/t/comments-vs-whitespace/126)

<div class="topic-metadata">

**Author:** [@jcbollinger](https://discourse.iucr.org/u/jcbollinger)\
**Replies:** 1\
**Last updated:** [October 2, 2013, 12:02am UTC](https://discourse.iucr.org/t/comments-vs-whitespace/126 "2013-10-02T00:02:09Z")

</div>

While working on details of the CIF API’s lexical scanner, I have discovered a couple of possible ambiguities with respect to where comments are allowed. Below I document the issue and how I have chosen to handle it in …

---

## [Status update](https://discourse.iucr.org/t/status-update/125)

<div class="topic-metadata">

**Author:** [@jcbollinger](https://discourse.iucr.org/u/jcbollinger)\
**Replies:** 0\
**Last updated:** [September 11, 2013, 5:05pm UTC](https://discourse.iucr.org/t/status-update/125 "2013-09-11T17:05:35Z")

</div>

I have completed initial implementation of the CIF formatter (function cif\_write() in the API docs), and I am now working on the parser. A preliminary version of the scanner is in place, and the rest of the parser is ro…

---

## [License](https://discourse.iucr.org/t/license/116)

<div class="topic-metadata">

**Author:** [@jcbollinger](https://discourse.iucr.org/u/jcbollinger)\
**Replies:** 0\
**Last updated:** [April 1, 2013, 5:24pm UTC](https://discourse.iucr.org/t/license/116 "2013-04-01T17:24:19Z")

</div>

Inasmuch as there are about to be (more) artifacts emerging from this effort in which there exist intellectual property rights, this seems a good time to discuss licensing. I am working under the assumption that an open…

---

## [Draft API specification](https://discourse.iucr.org/t/draft-api-specification/113)

<div class="topic-metadata">

**Author:** [@jamesrhester](https://discourse.iucr.org/u/jamesrhester)\
**Replies:** 7\
**Last updated:** [March 27, 2013, 9:58pm UTC](https://discourse.iucr.org/t/draft-api-specification/113 "2013-03-27T21:58:37Z")

</div>

Below I go through the exercise of writing out explicit specifications for CIF API functions. Consider the string ‘cif\_’ to be prepended for namespace purity. The general scheme is to model the ciffile as a set of data…

---

## [CIF Data Model](https://discourse.iucr.org/t/cif-data-model/83)

<div class="topic-metadata">

**Author:** [@jcbollinger](https://discourse.iucr.org/u/jcbollinger)\
**Replies:** 2\
**Last updated:** [February 4, 2013, 9:20pm UTC](https://discourse.iucr.org/t/cif-data-model/83 "2013-02-04T21:20:12Z")

</div>

With James’s permission, I would like to introduce an initiative of his that he and I have been working on: the CIF data model. This is a logical model with which the structure and data content of any CIF can be describ…

---

## [Survey of existing software](https://discourse.iucr.org/t/survey-of-existing-software/80)

<div class="topic-metadata">

**Author:** [@jamesrhester](https://discourse.iucr.org/u/jamesrhester)\
**Replies:** 12\
**Last updated:** [December 12, 2012, 2:08pm UTC](https://discourse.iucr.org/t/survey-of-existing-software/80 "2012-12-12T14:08:08Z")

</div>

I think it would be good for CIF software authors to compare this requirement list to their own software. My comparison with PyCIFRW follows: The API will support both CIF 1.1 and CIF 2.0. (Degree and form of support …

---

## [Level 1 CIF API compliance](https://discourse.iucr.org/t/level-1-cif-api-compliance/98)

<div class="topic-metadata">

**Author:** [@jamesrhester](https://discourse.iucr.org/u/jamesrhester)\
**Replies:** 5\
**Last updated:** [December 11, 2012, 11:03pm UTC](https://discourse.iucr.org/t/level-1-cif-api-compliance/98 "2012-12-11T23:03:16Z")

</div>

In the “Requirements List” thread we have a set of requirements relating to both implementation and functionality. May I suggest that we extract the three points that relate to the core functionality and agree that any …

---

## [Scope of the API - features](https://discourse.iucr.org/t/scope-of-the-api-features/75)

<div class="topic-metadata">

**Author:** [@jcbollinger](https://discourse.iucr.org/u/jcbollinger)\
**Replies:** 14\
**Last updated:** [January 17, 2012, 11:34pm UTC](https://discourse.iucr.org/t/scope-of-the-api-features/75 "2012-01-17T23:34:54Z")

</div>

The first question that occurred to me when I was presented with the idea of a standard CIF API was that of scope. What actions and data structures, generally speaking, will the API provide to clients? Here are some of…

---

## [Requirements for "core" features](https://discourse.iucr.org/t/requirements-for-core-features/78)

<div class="topic-metadata">

**Author:** [@jcbollinger](https://discourse.iucr.org/u/jcbollinger)\
**Replies:** 9\
**Last updated:** [January 17, 2012, 11:22pm UTC](https://discourse.iucr.org/t/requirements-for-core-features/78 "2012-01-17T23:22:13Z")

</div>

In the “Scope - Features” topic, James characterized the core features of a CIF API like so: (1) Open, read, write, close a CIF file (2) Read, write a key-value pair (3) Open/Create a loop structure (4) Read/Write pa…

---

## [Requirements List](https://discourse.iucr.org/t/requirements-list/79)

<div class="topic-metadata">

**Author:** [@jcbollinger](https://discourse.iucr.org/u/jcbollinger)\
**Replies:** 1\
**Last updated:** [January 10, 2012, 3:52pm UTC](https://discourse.iucr.org/t/requirements-list/79 "2012-01-10T15:52:57Z")

</div>

This topic is for documenting API requirements gleaned from discussions elsewhere in the forum. Discussion of these requirements generally belongs in other topics. Editorial comments about the requirements documented h…

---

## [Scope of the API - language support](https://discourse.iucr.org/t/scope-of-the-api-language-support/77)

<div class="topic-metadata">

**Author:** [@jcbollinger](https://discourse.iucr.org/u/jcbollinger)\
**Replies:** 3\
**Last updated:** [January 9, 2012, 9:56pm UTC](https://discourse.iucr.org/t/scope-of-the-api-language-support/77 "2012-01-09T21:56:01Z")

</div>

It is perhaps a question better considered later, but we will eventually need to decide on the native language(s) for the API. Having done that, we will have the option of defining bindings to the API for use from other…

---

## [Scope of the API - CIF coverage](https://discourse.iucr.org/t/scope-of-the-api-cif-coverage/76)

<div class="topic-metadata">

**Author:** [@jcbollinger](https://discourse.iucr.org/u/jcbollinger)\
**Replies:** 1\
**Last updated:** [December 22, 2011, 11:23pm UTC](https://discourse.iucr.org/t/scope-of-the-api-cif-coverage/76 "2011-12-22T23:23:27Z")

</div>

Another important scope question is which versions of CIF it will cover. As a practical matter, I think it must support CIF 1.1. Surely it must eventually support CIF 2.0 as well, but should we target that for the the …

---

## [Welcome to the CIF API forum](https://discourse.iucr.org/t/welcome-to-the-cif-api-forum/74)

<div class="topic-metadata">

**Author:** [@jamesrhester](https://discourse.iucr.org/u/jamesrhester)\
**Replies:** 1\
**Last updated:** [December 20, 2011, 11:03pm UTC](https://discourse.iucr.org/t/welcome-to-the-cif-api-forum/74 "2011-12-20T23:03:47Z")

</div>

At the Madrid IUCr meeting, COMCIFS decided to develop an official CIF API. This forum is devoted to discussion and development of this API, with the ultimate goal of producing a clear specification. John Bollinger has…
