In Buddhist texts
Shakra (शक्र is the ruler of the Trāyastriṃśa Heaven according to Buddhist cosmology. His full title is Śakro devānām indraḥ (शक्रो देवानामिन्द्रः; Pāli: Sakko devānaṃ indo), "Śakra, Lord of the Devas".
The name Śakra "powerful" as an epithet of Indra is found in several verses of the Rigveda. In Buddhist texts, Śakra's myth and character are very different from those of the Vedic Indra. According to G.P. Malalasekara, "Sakka and Indra are independent conceptions. None of the personal characteristics of Sakka resemble those of Indra. Some epithets are identical but are evidently borrowed, though they are differently explained."
The Trāyastriṃśa heaven that Śakra rules is located on the top of Mount Sumeru (cf. Meru), imagined to be the polar center of the physical world, around which the Sun and Moon revolve. Trāyastriṃśa is the highest of the heavens in direct contact with Earth. Like the other deities of this heaven, Śakra is long-lived but mortal. When one Śakra dies, his place is taken by another deity who becomes the new Śakra. Buddhist stories about Śakra (past or present) are found in the Jātaka stories and in several suttas, particularly in the Saṃyutta Nikāya.
Śakra is married to Sujā, daughter of the chief of the Asuras, Vemacitrin (Pāli Vepacitti). Despite this relationship, a state of war generally exists between the thirty-three gods and the Asuras, which Śakra manages to resolve with minimal violence and no loss of life.
Śakra is mentioned in many Buddhist sūtras, and is often shown consulting the Buddha on questions of morality. Together with Brahmā, he is considered a protector of the Buddhist religion.
Shakra (शक्र) is mentioned in Mahabharata (I.57.18),(I.59.15), (I.60.35), (I.90.69), (1.95),(III.170.61),(IX.42.32),
Adi Parva, Mahabharata/ Book I Chapter 57 mentions Uparichara Vasu, who conquered kingdom of Chedi and his sons planted kingdoms and towns. Shakra (शक्र) is mentioned in Mahabharata verse (I.57.18). ....The slayer of Vritra (Indra) also gave the king, for his gratification, a bamboo pole for protecting the honest and the peaceful. After the expiry of a year, the king planted it in the ground for the purpose of worshipping the giver thereof, viz., Sakra. From that time forth, O monarch, all kings, following Vasu's example, began to plant a pole for the celebration of Indra's worship.
Adi Parva, Mahabharata/Book I Chapter 59 gives genealogy of Danavas, Gandharvas, Apsaras, Yakshas, Rakshasas. Shakra (शक्र) is mentioned in Mahabharata (I.59.15).....Aditi have sprung the twelve Adityas who are the lords of the universe. They are Dhata, Mitra, Aryaman, Shakra, Varuna, Ansha, Bhaga, Vivaswan, Pusha, Savita, Tvashta, and Vishnu.
Adi Parva, Mahabharata/Book I Chapter 60 gives genealogy of all the principal creatures. Shakra (शक्र) is mentioned in Mahabharata (I.60.35), ....And, O king, the sons of Aditi are twelve with Indra heading them all. And the youngest of them all was Vishnu upon whom the worlds depend. (I.60.40),.... The learned Sukra is Bhrigu's son. And the learned Sukra becoming a planet and engaged according to the command of the Self-existent in pouring and withholding rain, and in dispensing and remitting calamities, traverses, for sustaining the lives of all the creatures in the three worlds, through the skies. And the learned Sukra, of great intelligence and wisdom, of rigid vows, leading the life of a Brahmacharin, divided himself in twain by power of asceticism, and became the spiritual guide of both the Daityas and the gods. And after Sukra was thus employed by Brahman in seeking the welfare (of the gods and the Asuras).
Adi Parva, Mahabharata/Book I Chapter 90 gives History and family tree of Puru, Bharatas and Pandavas commencing from Daksha. Shakra (शक्र) is mentioned in Mahabharata (I.90.69). ... Therefore, he solicited Kunti to have offspring raised for him. So she raised up offspring. By Dharma she had Yudhishthira; by Maruta, Bhima: and by Sakra, Arjuna. And Pandu.
Vana Parva, Mahabharata/Book III Chapter 170 describes that Arjuna while returning, saw unearthly city, that impregnable (city) was inhabited by the Paulamas and Kalakas....wonderful city of the Daityas. Shakra (शक्र) is mentioned in Mahabharata (III.170.61).  ....And having slain those mighty Asuras, and destroyed Hiranyapura, and having also killed the Nivata-Kavachas, he came unto Shakra.
Shalya Parva, Mahabharata/Book IX Chapter 42 - Description of River Saraswati. Shakra (शक्र) is mentioned in Mahabharata (IX.42.32)....The water of that river, O Shakra, hath been made sacred by the Munis! Formerly the presence of that river at its site was concealed. ....Thus addressed, Shakra, at these words of Brahma, O Janamejaya, performed in that abode of Sarasvati diverse sacrifices.
- तस्याः शक्रस्य पूजार्थं भूमौ भूमिपतिस तदा, परवेशं कारयाम आस गते संवत्सरे तदा (I.57.18)
- धाता मित्रॊ ऽरयमा शक्रॊ वरुणश चांश एव च, भगॊ विवस्वान पूषा च सविता दशमस तथा (I.59.15); एकादशस तथा तवष्टा विष्णुर दवादश उच्यते, जघन्यजः स सर्वेषाम आदित्यानां गुणाधिकः
- दवादशैवादितेः पुत्राः शक्र मुख्या नराधिप, तेषाम अवरजॊ विष्णुर यत्र लॊकाः परतिष्ठिताः (I.60.35)
- 40 बरह्मणॊ हृदयं भित्त्वा निःसृतॊ भगवान भृगुः, भृगॊः पुत्रः कविर विद्वाञ शुक्रः कवि सुतॊ गरहः
- सा तत्र पुत्रान उत्पादयाम आस धर्माद युधिष्ठिरं मारुताद भीमसेनं शक्राद अर्जुनम इति (I.90.69)
- हिरण्यपुरम आरुज्य निहत्य च महासुरान, निवातकवचांश चैव ततॊ ऽहं शक्रम आगमम (III.170.61)
- तच्छिरॊ नमुचेश छिन्नं पृष्ठतः शक्रम अन्वयात, हे मित्रहन पाप इति बरुवाणं शक्रम अन्तिकात (IX.42.32)