<commit_before>.. _intro:

Introduction
============

ChemSpiPy is a Python wrapper that allows simple access to the web APIs offered by ChemSpider. The aim is to provide an
interface for users to access and query the ChemSpider database using Python, facilitating programs that can
automatically carry out the tasks that you might otherwise perform manually via the `ChemSpider website`_.

The ChemSpider website has `full documentation for the ChemSpider APIs`_. It can be useful to browse through this
documentation before getting started with ChemSpiPy to get an idea of what sort of features are available.

.. _securitytoken:

Obtaining a security token
--------------------------

Access to the ChemSpider API is free to academic users. Commercial users should contact the ChemSpider team to obtain
access.

Most operations require a "security token" that is issued to you automatically when you `register for a RSC ID`_ and
then sign in to ChemSpider. Once you have done this, you can find your security token on your
`ChemSpider User Profile`_.

Some operations require a further "Service Subscriber" role. Contact the ChemSpider team to discuss upgrading your user
account for access to these features.

ChemSpiPy license
-----------------

.. include:: ../../../LICENSE

.. _`ChemSpider website`: http://www.chemspider.com
.. _`full documentation for the ChemSpider APIs`: http://www.chemspider.com/AboutServices.aspx
.. _`register for a RSC ID`: https://www.rsc.org/rsc-id/sign-in
.. _`ChemSpider User Profile`: http://www.chemspider.com/UserProfile.aspx<commit_msg>Add token warning to docs<commit_after>.. _intro:

Introduction
============

ChemSpiPy is a Python wrapper that allows simple access to the web APIs offered by ChemSpider. The aim is to provide an
interface for users to access and query the ChemSpider database using Python, facilitating programs that can
automatically carry out the tasks that you might otherwise perform manually via the `ChemSpider website`_.

The ChemSpider website has `full documentation for the ChemSpider APIs`_. It can be useful to browse through this
documentation before getting started with ChemSpiPy to get an idea of what sort of features are available.

.. _securitytoken:

Obtaining a security token
--------------------------

Access to the ChemSpider API is free to academic users. Commercial users should contact the ChemSpider team to obtain
access.

Most operations require a "security token" that is issued to you automatically when you `register for a RSC ID`_ and
then sign in to ChemSpider. Once you have done this, you can find your security token on your
`ChemSpider User Profile`_.

Some operations require a further "Service Subscriber" role. Contact the ChemSpider team to discuss upgrading your user
account for access to these features.

.. warning::

   Make sure you copy the entire token from the Chemspider profile page. The text field is quite narrow so you may have
   to drag across to the right to select the entire token. The token format should be
   ``<KEY>``.

ChemSpiPy license
-----------------

.. include:: ../../../LICENSE

.. _`ChemSpider website`: http://www.chemspider.com
.. _`full documentation for the ChemSpider APIs`: http://www.chemspider.com/AboutServices.aspx
.. _`register for a RSC ID`: https://www.rsc.org/rsc-id/sign-in
.. _`ChemSpider User Profile`: http://www.chemspider.com/UserProfile.aspx
{'fraction_non_alphanumeric': 0.09138995004407875, 'fraction_numerical': 0.0, 'mean_word_length': 3.8079096045197742, 'pattern_counts': {'":': 0, '<': 4, '<?xml version=': 0, '>': 4, 'https://': 2, 'lorem ipsum': 0, 'www.': 8, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1850868', 'n_tokens_mistral': 894, 'n_tokens_neox': 854, 'n_words': 451}