Viruses are in many ways fascinating biological systems. They vary in their structure, their replication methods, and in their target hosts. They are the smallest self-replicating and self-assembling entities on Earth. Viruses are partly made of a protein shell called the capsid, the most important and interesting component as it encloses their genetic material. The main role of the capsid is to protect the viral genome. As a result and despite their smallness, they have evolved to sustain high external or internal constraints. However, the mechanisms underlying the appearance of viruses (through the capsids shape) and those that bring their high resistances are still poorly understood. Such problematics are of great interest as they could lead to the development of artificial nanocages. Viral derived nanocages are promising for various bioappplications, such as gene therapies or nanoapplications, such as drug delivery. The work I propose in my Ph.D. aims to contribute modestly to the understanding of viral assembly and stability using both analytical and numerical investigations.Viruses are biological structures produced thanks to molecular self-assembly. Because the final crystal is too be curved, the induced elastic stress is relaxed thanks to the introduction of topological defects in the protein lattice. We propose in the Ph.D. thesis a quantitative mechanism for this phenomenon by using standard thin shell elasticity. In particular, we show that the type and the angular location of a defect is determined by the value of the azimuthal stress that characterizes compressive or tensile regions. The elastic model proposed permits us to compare quantitatively the relaxation of mechanical stress induced by various defect distributions.Testing the mechanical stability of viral particles is possible thanks to nanoindentation experiments by atomic force microscopy. Using a coarse-grained molecular simulation of a viral structure, we build in the Ph.D. thesis a framework to help interpret mechanical information obtained by such nanoexperiments. More specifically, non-vanishing Gaussian curvature of viruses and the geometry of the tip have an influence on the viral quantitative stiffnesses that can be extracted. The coalescence of analytical and numerical results enables us to capture and rationalize the latter influence. We hope the latter work to be of interest for following investigations regarding mechanical aspects of viruses.