Tripiṭaka (Sanskrit: [trɪˈpɪʈɐkɐ]) or Tipiṭaka (Pali: [tɪˈpɪʈɐkɐ]) is the traditional term for the Buddhist scriptures. The version canonical to Theravada Buddhism is generally referred to in English as the Pali Canon. Mahayana Buddhism also holds the Tripiṭaka to be authoritative but, unlike Theravadins, it also includes in its canon various derivative literature and commentaries that were composed much later.
The Tripiṭaka was composed between about 550 BCE and about the start of the common era, likely written down for the first time in the 1st century BCE. The Dipavamsa states that during the reign of Valagamba of Anuradhapura (29–17 BCE) the monks who had previously remembered the Tripiṭaka and its commentary orally now wrote them down in books, because of the threat posed by famine and war. The Mahavamsa also refers briefly to the writing down of the canon and the commentaries at this time. Each Buddhist sub-tradition had its own Tripiṭaka for its monasteries, written by its sangha, each set consisting of 32 books, in three parts or baskets of teachings: Vinaya Piṭaka (“Basket of Discipline”), Sūtra Piṭaka (“Basket of Discourse”), and Abhidharma Piṭaka (“Basket of Special [or Further] Doctrine”). The structure, the code of conduct and moral virtues in the Vinaya basket particularly, have similarities to some of the surviving Dharmasutra texts of Hinduism. Much of the surviving Tripiṭaka literature is in Pali, with some in Sanskrit as well as other local Asian languages.
Tripiṭaka (Sanskrit: त्रिपिटक), also called Tipiṭaka (Pali), means Three Baskets. It is a compound Sanskrit word of tri (त्रि) meaning three, and pitaka (पिटक) or pita (पिट), meaning "basket or box made from bamboo or wood". The 'three baskets' were originally the receptacles of the palm-leaf manuscripts on which were preserved the Sutta Piṭaka, the Vinaya Piṭaka and the Abhidhamma Piṭaka, the three divisions that constitute the Pali Canon. These terms are also spelled without diacritics as Tripiṭaka and Tipiṭaka in scholarly literature.
The dating of the Tripiṭaka is unclear. Max Müller states that the current structure and contents of the Pali Canon took shape in the third century BCE after which it continued to be transmitted orally from generation to generation (just like the Vedas and the early Upanishads) until finally being put into written form in the 1st century BCE (nearly 500 years after the lifetime of Buddha).
According to A. K. Warder, the Tibetan historian Bu-ston said that around or before the 1st century CE there were eighteen schools of Buddhism each with their own Tripiṭakas transcribed into written form. However, except for one version that has survived in full and others, of which parts have survived, all of these texts are lost to history or yet to be found.
The Tripiṭaka was compiled and put into writing for the first time during the reign of King Walagambahu of Sri Lanka (1st century BCE). According to Sri Lankan sources more than 1000 monks who had attained Arahantship were involved in the task. The place where the project was undertaken was in Aluvihare, Matale, Sri Lanka. The resulting texts were later partly translated into a number of East Asian languages such as Chinese, Tibetan and Mongolian by ancient visiting scholars, which though extensive are incomplete.
Wu and Chia state that emerging evidence, though uncertain, suggests that the earliest written Buddhist Tripiṭaka texts may have arrived in China from India by the 1st century BCE.
The Tripiṭaka is composed of three main categories of texts that collectively constitute the Buddhist canon: the Sutta Piṭaka, the Vinaya Piṭaka, and the Abhidhamma Piṭaka. The Sūtra Piṭaka is older than the Vinaya Piṭaka, and the Abhidharma Piṭaka represents a later tradition of scholastic analysis and systematization of the contents of the Sutta Piṭaka originating at least two centuries after the other two parts of the canon. The Vinaya Piṭaka appears to have grown gradually as a commentary and justification of the monastic code (Prātimokṣa), which presupposes a transition from a community of wandering mendicants (the Sūtra Piṭaka period ) to a more sedentary monastic community (the Vinaya Piṭaka period). Even within the Sūtra Piṭaka it is possible to detect older and later texts.
Rules and regulations of monastic life that range from dress code and dietary rules to prohibitions of certain personal conducts.
Sutras were the doctrinal teachings in aphoristic or narrative format. The Buddha delivered all of his sermons in Magadhan. These sermons were rehearsed orally during the meeting of the First Buddhist council just after the Parinibbana of the Buddha. The teachings continued to be transmitted orally until they were written down in the first century BCE.
Philosophical and psychological analysis and interpretation of Buddhist doctrine.
The 6th century CE Indian monk Paramārtha wrote that 200 years after the parinirvāṇa of the Buddha, much of the Mahāsāṃghika school moved north of Rājagṛha, and were divided over whether the Mahāyāna sūtras should be incorporated formally into their Tripiṭaka. According to this account, they split into three groups based upon the relative manner and degree to which they accepted the authority of these Mahāyāna texts. Paramārtha states that the Kukkuṭika sect did not accept the Mahāyāna sūtras as buddhavacana ("words of the Buddha"), while the Lokottaravāda sect and the Ekavyāvahārika sect did accept the Mahāyāna sūtras as buddhavacana. Also in the 6th century CE, Avalokitavrata writes of the Mahāsāṃghikas using a "Great Āgama Piṭaka," which is then associated with Mahāyāna sūtras such as the Prajñāparamitā and the Daśabhūmika Sūtra.
According to some sources, abhidharma was not accepted as canonical by the Mahāsāṃghika school. The Theravādin Dīpavaṃsa, for example, records that the Mahāsāṃghikas had no abhidharma. However, other sources indicate that there were such collections of abhidharma, and the Chinese pilgrims Faxian and Xuanzang both mention Mahāsāṃghika abhidharma. On the basis of textual evidence as well as inscriptions at Nāgārjunakoṇḍā, Joseph Walser concludes that at least some Mahāsāṃghika sects probably had an abhidharma collection, and that it likely contained five or six books.
The Caitikas included a number of sub-sects including the Pūrvaśailas, Aparaśailas, Siddhārthikas, and Rājagirikas. In the 6th century CE, Avalokitavrata writes that Mahāyāna sūtras such as the Prajñāparamitā and others are chanted by the Aparaśailas and the Pūrvaśailas. Also in the 6th century CE, Bhāvaviveka speaks of the Siddhārthikas using a Vidyādhāra Piṭaka, and the Pūrvaśailas and Aparaśailas both using a Bodhisattva Piṭaka, implying collections of Mahāyāna texts within these Caitika schools.
The Bahuśrutīya school is said to have included a Bodhisattva Piṭaka in their canon. The Satyasiddhi Śāstra, also called the Tattvasiddhi Śāstra, is an extant abhidharma from the Bahuśrutīya school. This abhidharma was translated into Chinese in sixteen fascicles (Taishō Tripiṭaka 1646). Its authorship is attributed to Harivarman, a third-century monk from central India. Paramārtha cites this Bahuśrutīya abhidharma as containing a combination of Hīnayāna and Mahāyāna doctrines, and Joseph Walser agrees that this assessment is correct.
The Prajñaptivādins held that the Buddha's teachings in the various piṭakas were nominal (Skt. prajñapti), conventional (Skt. saṃvṛti), and causal (Skt. hetuphala). Therefore, all teachings were viewed by the Prajñaptivādins as being of provisional importance, since they cannot contain the ultimate truth. It has been observed that this view of the Buddha's teachings is very close to the fully developed position of the Mahāyāna sūtras. 
Scholars at present have "a nearly complete collection of sūtras from the Sarvāstivāda school" thanks to a recent discovery in Afghanistan of roughly two-thirds of Dīrgha Āgama in Sanskrit. The Madhyama Āgama (Taishō Tripiṭaka 26) was translated by Gautama Saṃghadeva, and is available in Chinese. The Saṃyukta Āgama (Taishō Tripiṭaka 99) was translated by Guṇabhadra, also available in Chinese translation. The Sarvāstivāda is therefore the only early school besides the Theravada for which we have a roughly complete Sūtra Piṭaka. The Sārvāstivāda Vinaya Piṭaka is also extant in Chinese translation, as are the seven books of the Sarvāstivāda Abhidharma Piṭaka. There is also the encyclopedic Abhidharma Mahāvibhāṣa Śāstra (Taishō Tripiṭaka 1545), which was held as canonical by the Vaibhāṣika Sarvāstivādins of northwest India.
Portions of the Mūlasārvāstivāda Tripiṭaka survive in Tibetan translation and Nepalese manuscripts. The relationship of the Mūlasārvāstivāda school to Sarvāstivāda school is indeterminate; their vinayas certainly differed but it is not clear that their Sūtra Piṭaka did. The Gilgit manuscripts may contain Āgamas from the Mūlasārvāstivāda school in Sanskrit. The Mūlasārvāstivāda Vinaya Piṭaka survives in Tibetan translation and also in Chinese translation (Taishō Tripiṭaka 1442). The Gilgit manuscripts also contain vinaya texts from the Mūlasārvāstivāda school in Sanskrit.
A complete version of the Dīrgha Āgama (Taishō Tripiṭaka 1) of the Dharmaguptaka school was translated into Chinese by Buddhayaśas and Zhu Fonian (竺佛念) in the Later Qin dynasty, dated to 413 CE. It contains 30 sūtras in contrast to the 34 suttas of the Theravadin Dīgha Nikāya. A. K. Warder also associates the extant Ekottara Āgama (Taishō Tripiṭaka 125) with the Dharmaguptaka school, due to the number of rules for monastics, which corresponds to the Dharmaguptaka Vinaya. The Dharmaguptaka Vinaya is also extant in Chinese translation (Taishō Tripiṭaka 1428), and Buddhist monastics in East Asia adhere to the Dharmaguptaka Vinaya.
The Dharmaguptaka Tripiṭaka is said to have contained a total of five piṭakas. These included a Bodhisattva Piṭaka and a Mantra Piṭaka (Ch. 咒藏), also sometimes called a Dhāraṇī Piṭaka. According to the 5th century Dharmaguptaka monk Buddhayaśas, the translator of the Dharmaguptaka Vinaya into Chinese, the Dharmaguptaka school had assimilated the Mahāyāna Tripiṭaka (Ch. 大乘三藏).
Small portions of the Tipiṭaka of the Kāśyapīya school survive in Chinese translation. An incomplete Chinese translation of the Saṃyukta Āgama of the Kāśyapīya school by an unknown translator circa the Three Qin (三秦) period (352-431 CE) survives.
The complete Tripiṭaka set of the Theravāda school is written and preserved in Pali in the Pali Canon. Buddhists of the Theravāda school use the Pali variant Tipiṭaka to refer what is commonly known in English as the Pali Canon.
The term Tripiṭaka had tended to become synonymous with Buddhist scriptures, and thus continued to be used for the Chinese and Tibetan collections, although their general divisions do not match a strict division into three piṭakas.
An organised collection of Buddhist texts began to emerge in the 6th century, based on the structure of early bibliographies of Buddhist texts. However, it was the 'Kaiyuan Era Catalogue' by Zhisheng in 730 that provided the lasting structure. Zhisheng introduced the basic six-fold division with sutra, vinaya, and abhidharma belonging to Mahāyāna and Hīnayana. It is likely that Zhisheng's catalogue proved decisive because it was used to reconstruct the Canon after the persecutions of 845 CE, however it was also considered a "perfect synthesis of the entire four-hundred-year development of a proper Chinese form of the Canon." 
The Chinese form of Tripiṭaka, "sānzàng" (三藏), was sometimes used as an honorary title for a Buddhist monk who has mastered the teachings of the Tripiṭaka. In Chinese culture, this is notable in the case of the Tang Dynasty monk Xuanzang, whose pilgrimage to India to study and bring Buddhist texts back to China was portrayed in the novel Journey to the West as "Tang Sanzang" (Tang Dynasty Tripiṭaka Master). Due to the popularity of the novel, the term "sānzàng" is often erroneously understood as a name of the monk Xuanzang. One such screen version of this is the popular 1979 Monkey (TV series).