Skip to main content

Python package to list and download all original images from Flickr Apollo Archive

Project description

Build Coverage PyPI Status Version Python License Tutorial

Python package to list and download all original images from Flickr Apollo Archive.

Moon

Project Apollo Archive / Apollo 11 Magazine 40/S (v1 / levels-adj) / AS11-40-5949

Install

With pip:

$ pip install apollo-archive

With the source files:

$ git clone https://github.com/seignovert/python-flickr-apollo-archive.git apollo-archive
$ cd apollo-archive ; python setup.py install

Python usage

Query Flickr API:

>>> from apolloarchive import User

>>> user = User()
Flickr User: Apollo Image Gallery (136485307@N06) | 107 albums

>>> albums = user.albums
[
    Album: "Announcements" (3 photos),
    Album: "Apollo 7 Magazine 3/M" (46 photos),
    Album: "Apollo 7 Magazine 4/N" (55 photos),
    ...
    Album: "Apollo 17 Magazine 163/TT" (72 photos)
]

>>> albums[0].slug
'Announcements'

>>> albums[0].photos
[
    Photo: "(also) Follow Project Apollo Archive on Facebook",
    Photo: "About the Project Apollo Archive Flickr Gallery",
    Photo: "The Project Apollo Archive is best experienced in the "Albums" view"
]

>>> albums[0].photos[0].url
'https://farm1.staticflickr.com/622/21878909302_a369c0c4de_o.jpg'

>>> albums[0].photos[0].filename
'Also-follow-project-apollo-archive-on-facebook.jpg'

Sync Flickr photosets:

>>> from apolloarchive import sync

>>> sync(album=0, ncpu=4, overwrite=True)
Sync Announcements: 100%|█████████████████████████| 3/3 [00:00<00:00,  3.89it/s]
> Download: Also-follow-project-apollo-archive-on-facebook
> Download: About-the-project-apollo-archive-flickr-gallery
> Download: The-project-apollo-archive-is-best-experienced-in-the-albums-view

CLI usage

Sync Flickr photosets:

$ apollo-archive --help
usage: apollo-archive [-h] [--user-id USER_ID] [--username USERNAME]
                      [--album ALBUM] [--ncpu NCPU] [--overwrite]

Sync Flickr folder(s)

optional arguments:
  -h, --help                       show this help message and exit
  --user-id USER_ID, -i USER_ID    User ID
  --username USERNAME, -u USERNAME Username
  --album ALBUM, -a ALBUM          Album number to sync
  --ncpu NCPU, -n NCPU             Number of thread during for download
  --overwrite, -o                  Re-download all

$ apollo-archive --album 0 --ncpu 4 --overwrite
Sync Announcements: 100%|█████████████████████████| 3/3 [00:00<00:00,  3.89it/s]
> Download: Also-follow-project-apollo-archive-on-facebook
> Download: About-the-project-apollo-archive-flickr-gallery
> Download: The-project-apollo-archive-is-best-experienced-in-the-albums-view

Dependencies

  • flickrapi

  • python-slugify

  • wget

  • tqdm

  • argparse

Disclaimer

This project is not supported or endorsed by either JPL or NASA. The code is provided “as is”, use at your own risk.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

apollo-archive-1.3.tar.gz (281.3 kB view details)

Uploaded Source

Built Distribution

apollo_archive-1.3-py2.py3-none-any.whl (9.0 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file apollo-archive-1.3.tar.gz.

File metadata

  • Download URL: apollo-archive-1.3.tar.gz
  • Upload date:
  • Size: 281.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.6.3 requests-toolbelt/0.8.0 tqdm/4.29.1 CPython/3.6.3

File hashes

Hashes for apollo-archive-1.3.tar.gz
Algorithm Hash digest
SHA256 46d6fd88bfc3deacadc5edf274e82e26558df2e24eb4cd8858abbba0a1b14979
MD5 95fa869bee85bb0907bf83810e9561ec
BLAKE2b-256 8fe716e836f0670b48487195a842f194ca7ee9bec5cfd5b2cfcc4fd0a754c764

See more details on using hashes here.

File details

Details for the file apollo_archive-1.3-py2.py3-none-any.whl.

File metadata

  • Download URL: apollo_archive-1.3-py2.py3-none-any.whl
  • Upload date:
  • Size: 9.0 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.6.3 requests-toolbelt/0.8.0 tqdm/4.29.1 CPython/3.6.3

File hashes

Hashes for apollo_archive-1.3-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 9f35abb36dd6d2bcb8417cb3e8a113102a94a7e30fd203e708702068b92ab5d5
MD5 3495f63ef7eeaf6025ad5dd9a60d0a81
BLAKE2b-256 12400b522014d3a99db5b4b05b6a0117395f64fb5bea62c7df4cceaffc3f7d66

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page