Python Forum
how to download a tarball on github?
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
how to download a tarball on github?
#1
does anyone here in the bar know where/how to download a tarball (as opposed to a zip file) of a package/project on github?
Tradition is peer pressure from dead people

What do you call someone who speaks three languages? Trilingual. Two languages? Bilingual. One language? American.
Reply
#2
Here's something that apparently will create one if one is not offered.
git archive --format=tar --prefix=git-1.4.0/ v1.4.0 | gzip >git-1.4.0.tar.gz
pypi has links to the tarballs that exist. Many are just zip files

To create a json file with package information, use:
https://pypi.python.org/pypi/<packagename>/json
Reply
#3
so it sends uncompressed .tar and you can compress it?  i hope it's not send a zip and converting that to to format.  i am thinking of using github but i know some of my packages won't work via zip (it messes up permissions).

got this:

Output:
lt1/forums /home/forums 1> git archive --format=tar --prefix=git-1.4.0/ v1.4.0 | gzip >git-1.4.0.tar.gz fatal: Not a git repository (or any parent up to mount point /home) Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set). lt1/forums /home/forums 2>
Tradition is peer pressure from dead people

What do you call someone who speaks three languages? Trilingual. Two languages? Bilingual. One language? American.
Reply
#4
I don't think github compresses anything.  The individual project would need to have uploaded a tar.
Reply
#5
I would actually consider this a discussion rather than a bar thread. Bar i am thinking of nothing to do with programming or even computers even. Where downloading from github has some relativity to python. So i think discussions would be better suited.
Recommended Tutorials:
Reply
#6
(Nov-02-2017, 02:14 AM)metulburr Wrote: I would actually consider this a discussion rather than a bar thread. Bar i am thinking of nothing to do with programming or even computers even. Where downloading from github has some relativity to python. So i think discussions would be better suited.
i chose bar because it was off-topic.  sure, many python coders may be interested.  the git command does not appear to be implemented in python, either.
Tradition is peer pressure from dead people

What do you call someone who speaks three languages? Trilingual. Two languages? Bilingual. One language? American.
Reply
#7
git is so entwined with coding though. And discussion is not discussion about python, but general coding.
but yeah i guess it could go on the fence here
Recommended Tutorials:
Reply
#8
anyway, Larz's command didn't work for me
Tradition is peer pressure from dead people

What do you call someone who speaks three languages? Trilingual. Two languages? Bilingual. One language? American.
Reply
#9
Doc
Example with TextBlob
λ curl -L https://github.com/sloria/TextBlob/tarball/master > TextBlob.tar.gz
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 130 0 130 0 0 209 0 --:--:-- --:--:-- --:--:-- 220
100 667k 100 667k 0 0 340k 0 0:00:01 0:00:01 --:--:-- 1039k
I have never used this method,if need a Repo i always use git clone.
λ git clone https://github.com/sloria/TextBlob.git
Cloning into 'TextBlob'...
remote: Counting objects: 3499, done.
remote: Total 3499 (delta 0), reused 0 (delta 0), pack-reused 3499R
Receiving objects: 100% (3499/3499), 7.89 MiB | 2.61 MiB/s, done.
Resolving deltas: 100% (1907/1907), done.
Checking connectivity... done.
Reply
#10
The first part of my answer was bogus (sorry about that). The second part will give you a json file with details of a package.
In that json data, you'll find release data, which can be contains filename keys, with: filename    "speech-0.4.6.tar.gz"
for example. In that node, you will find a url tag containing the complete url for the tar file.
There's a page with developer info here: https://wiki.python.org/moin/CheeseShopDev
Reply


Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020