Skip to content

Commit

Permalink
Merge pull request #12 from mcs07/rest_api
Browse files Browse the repository at this point in the history
Switch to new RSC REST API
  • Loading branch information
mcs07 committed Aug 21, 2018
2 parents 5452809 + d9c8694 commit 24970dd
Show file tree
Hide file tree
Showing 28 changed files with 1,168 additions and 1,713 deletions.
11 changes: 11 additions & 0 deletions .gitignore
@@ -0,0 +1,11 @@
__pycache__/
*.py[cod]
build/
dist/
*.egg-info/
.coverage
.coverage.*
.cache
.pytest_cache/
.ipynb_checkpoints
.idea/
6 changes: 1 addition & 5 deletions .travis.yml
Expand Up @@ -5,13 +5,9 @@ python:
- "3.6"
env:
global:
- secure: "QQlGoUF2W9DDvdhXhMMfJyA2nSlj8J0QH31b9A1JlbSoIf89H5cjEcYYWqP4WF5sVyBdTm6vbjqQijWSJAjMZkxJduUMYYsHGQZDFuYoyKherS6JbhbJOZH7TmbcepSbBkDf1IJ/JxTMw2yZdXXMO/YmGq6Tc5dmch2XKOGm4f0="
matrix:
- OPTIONAL_DEPS=true
- OPTIONAL_DEPS=false
- secure: "N/t4txw1k9bOUsLQWQOpzdJpMAdFFzzJqN2rWiijMJPEC9E1meoKMzFYr4kgNjInhVfkud8+3fOHZL/Ns4MLWexf1vsG1NFvrXSBuBD6MlPKYe77bb9WTmRvWfLSDg6F5BP/1uFjwebj4USN14RWlxyIgmsC1+bdCFVN2Wktg4k="
install:
- pip install coveralls pytest requests six
- if [ "$OPTIONAL_DEPS" = true ]; then pip install lxml; fi
script:
- coverage run --source=chemspipy -m pytest
after_success:
Expand Down
2 changes: 1 addition & 1 deletion LICENSE
@@ -1,6 +1,6 @@
The MIT License

Copyright (c) 2013 Matt Swain <m.swain@me.com>
Copyright (c) 2018 Matt Swain <m.swain@me.com>

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
2 changes: 1 addition & 1 deletion README.rst
Expand Up @@ -17,7 +17,7 @@ ChemSpiPy provides a way to interact with ChemSpider in Python. It allows chemic
depiction and retrieval of chemical properties::

>>> from chemspipy import ChemSpider
>>> cs = ChemSpider('<YOUR-SECURITY-TOKEN>')
>>> cs = ChemSpider('<YOUR-API-KEY>')
>>> c1 = cs.get_compound(236) # Specify compound by ChemSpider ID
>>> c2 = cs.search('benzene') # Search using name, SMILES, InChI, InChIKey, etc.

Expand Down
6 changes: 2 additions & 4 deletions chemspipy/__init__.py
Expand Up @@ -5,8 +5,6 @@
Python wrapper for the ChemSpider API.
:copyright: Copyright 2014 by Matt Swain.
:license: MIT, see LICENSE file for more details.
"""

from __future__ import print_function
Expand All @@ -20,7 +18,7 @@
__license__ = 'MIT'


from .api import ChemSpider, MOL2D, MOL3D, BOTH, ASCENDING, DESCENDING, CSID, MASS_DEFECT, MOLECULAR_WEIGHT
from .api import ChemSpider, MOL2D, MOL3D, BOTH, ASCENDING, DESCENDING, RECORD_ID, CSID, MASS_DEFECT, MOLECULAR_WEIGHT
from .api import REFERENCE_COUNT, DATASOURCE_COUNT, PUBMED_COUNT, RSC_COUNT
from .objects import Compound, Spectrum
from .objects import Compound
from .search import Results

0 comments on commit 24970dd

Please sign in to comment.